diff options
author | Luke Shumaker <shumakl@purdue.edu> | 2014-05-06 22:22:00 -0400 |
---|---|---|
committer | Luke Shumaker <shumakl@purdue.edu> | 2014-05-06 22:22:00 -0400 |
commit | 44fa9b5b07062c165192a50fea4301e57d3424ba (patch) | |
tree | d265d0bcda45ef980e88092b83bfc46098c9e19f /src/us/minak/MetaCircle.java | |
parent | 2b66c7acedf133bb000a34a3881cc3b88f7afa83 (diff) | |
parent | 100d98e3ff6798ce2e2a8f1f97b8b24de1e20168 (diff) |
Merge branch 'master' of github.com:AndrewMurrell/minak
Conflicts:
src/us/minak/IMEGestureOverlayView.java
src/us/minak/IMEService.java
src/us/minak/IMEView.java
Diffstat (limited to 'src/us/minak/MetaCircle.java')
-rw-r--r-- | src/us/minak/MetaCircle.java | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/us/minak/MetaCircle.java b/src/us/minak/MetaCircle.java new file mode 100644 index 0000000..908842a --- /dev/null +++ b/src/us/minak/MetaCircle.java @@ -0,0 +1,29 @@ +package us.minak; + +/* + * Not sure if this should be drawable or what. + * + */ +public class MetaCircle { + public MetaExpression metaExpr; + public float x; + public float y; + public float radius; + public int color; + public boolean expanded; + public int expansion; //the level of expansion (if multiple circles are expanded, this decides precidence) + + MetaCircle(float x, float y, float radius, int color, MetaExpression metaExpr) { + this.metaExpr = metaExpr; + this.x = x; + this.y = y; + this.radius = radius; + this.color = color; + 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; + } +} |