From a7f6309a19f93f02f6dfb98aeb976fe6969b1821 Mon Sep 17 00:00:00 2001 From: AndrewMurrell Date: Tue, 6 May 2014 21:22:44 -0400 Subject: Added containsPoint method to MetaCircle.java --- src/us/minak/MetaCircle.java | 6 ++++-- 1 file 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; + } } -- cgit v1.2.3-54-g00ecf