summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrewMurrell <amurrel@purdue.edu>2014-05-06 21:22:44 -0400
committerAndrewMurrell <amurrel@purdue.edu>2014-05-06 21:22:44 -0400
commita7f6309a19f93f02f6dfb98aeb976fe6969b1821 (patch)
tree82efba27cd78f10eeefe00b10c4e5f63972e9a82
parent44f668e012cfd1eca3be3d31966cf2eb9ad4f620 (diff)
Added containsPoint method to MetaCircle.java
-rw-r--r--src/us/minak/MetaCircle.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/us/minak/MetaCircle.java b/src/us/minak/MetaCircle.java
index 9023671..908842a 100644
--- a/src/us/minak/MetaCircle.java
+++ b/src/us/minak/MetaCircle.java
@@ -1,7 +1,5 @@
package us.minak;
-import android.graphics.Color;
-
/*
* Not sure if this should be drawable or what.
*
@@ -24,4 +22,8 @@ public class MetaCircle {
this.expanded = false;
this.expansion = 0;
}
+
+ public boolean containsPoint(float x, float y) {
+ return Math.pow(x - this.x, 2) + Math.pow(y - this.y, 2) < Math.pow(this.radius, 2) ? true : false;
+ }
}