Skip to content

Commit 4c1d971

Browse files
committed
fix
1 parent 655354a commit 4c1d971

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

src/main/java/com/teammoeg/chorda/math/CircleDimension.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,25 +51,27 @@ public void addPos(float x, float y) {
5151
this.y = targetY;
5252
} else {
5353
//if previous point is inside the circle
54-
if ( radiusSquared-EDGE_THRESOLD > this.x * this.x + this.y * this.y) {
54+
//if ( radiusSquared-EDGE_THRESOLD > this.x * this.x + this.y * this.y) {
5555

5656
double theta = Math.atan2(targetY, targetX);
5757
this.x = (float) (radius * Math.cos(theta));
5858
this.y = (float) (radius * Math.sin(theta));
59-
} else { // previous point at edge
59+
/* } else { // previous point at edge
6060
6161
double thetaPrev = Math.atan2(this.x, this.y);
6262
// Calculate movement in tangent direction
6363
double tangentDisp = x * (-Math.sin(thetaPrev)) + y * Math.cos(thetaPrev);
6464
double thetaCurrent = thetaPrev + tangentDisp / radius;
6565
this.x = (float) (radius * Math.cos(thetaCurrent));
6666
this.y = (float) (radius * Math.sin(thetaCurrent));
67-
}
67+
}*/
6868
}
6969
}
7070

7171
public static void main(String[] args) {
7272
CircleDimension cdm=new CircleDimension(125);
73+
cdm.addPos(-250, 250);
74+
cdm.addPos(0, 250);
7375
System.out.println(cdm);
7476
}
7577

src/main/java/com/teammoeg/frostedheart/content/wheelmenu/WheelMenuRenderer.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -229,16 +229,15 @@ public static void tick() {
229229
if (openingStatus < 6)
230230
openingStatus++;
231231
} else {
232-
233-
if (openingStatus > 0) {
234-
isClosing = true;
235-
openingStatus -= 2;
236-
if (openingStatus <= 0) {
237-
openingStatus = 0;
238-
isClosing = false;
239-
onClose();
240-
}
232+
isClosing = true;
233+
openingStatus -= 2;
234+
if (openingStatus <= 0) {
235+
openingStatus = 0;
236+
isClosing = false;
237+
onClose();
238+
return;
241239
}
240+
242241
}
243242
boolean shouldUpdate = false;
244243
for (Selection selection : selections) {

0 commit comments

Comments
 (0)