diff options
author | Christopher Baines <cbaines8@gmail.com> | 2011-09-13 10:53:16 +0100 |
---|---|---|
committer | Christopher Baines <cbaines8@gmail.com> | 2011-09-13 10:53:16 +0100 |
commit | 116fbc975315dc88fd87dda4a941cfb57ea1f94f (patch) | |
tree | 719aee0d5704bd4f5389be1587b96021d942fde1 /PunchingBag | |
parent | 0e1a25d62e358f017faf6ee9735a668161dc640d (diff) | |
download | punchingbag-116fbc975315dc88fd87dda4a941cfb57ea1f94f.tar punchingbag-116fbc975315dc88fd87dda4a941cfb57ea1f94f.tar.gz |
Improved drawCircle.
Diffstat (limited to 'PunchingBag')
-rw-r--r-- | PunchingBag/src/PunchingBag.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/PunchingBag/src/PunchingBag.java b/PunchingBag/src/PunchingBag.java index f27738f..271ef60 100644 --- a/PunchingBag/src/PunchingBag.java +++ b/PunchingBag/src/PunchingBag.java @@ -166,6 +166,7 @@ public class PunchingBag implements Runnable { double currentRadius = 0.5; public CircleExpand(int x, int y, int intensity) { + System.out.println("Circle Expand"); this.x = x + 0.5; this.y = y + 0.5; this.intensity = intensity; @@ -391,8 +392,8 @@ public class PunchingBag implements Runnable { int px; int py; for (double i = 0; i < 360; i++) { - px = (int) (x + Math.round(radius * Math.cos(i))); - py = (int) (y + Math.round(radius * Math.sin(i))); + px = (int) Math.round(x + (radius * Math.cos(i))); + py = (int) Math.round(y + (radius * Math.sin(i))); if (x >= 0 && x <= 8 && y >= 0 && y <= 19) { if (setLEDInternal(px, py, colour)) { |