aboutsummaryrefslogtreecommitdiff
path: root/PunchingBag
diff options
context:
space:
mode:
Diffstat (limited to 'PunchingBag')
-rw-r--r--PunchingBag/src/PunchingBag.java5
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)) {