Skip to content

Commit

Permalink
Oof
Browse files Browse the repository at this point in the history
  • Loading branch information
tr7zw committed Jan 3, 2024
1 parent b40afb4 commit ee8ab53
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,7 @@ public static float lerpAngle(float delta, float start, float end) {
}

public static float wrapDegrees(float angle) {
float wrappedAngle = angle % NMSHelper.TWO_PI; // 2 * π ≈ 6.28318531
if (wrappedAngle >= NMSHelper.PI) {
wrappedAngle -= NMSHelper.TWO_PI; // 2 * π
}
if (wrappedAngle < -NMSHelper.PI) {
wrappedAngle += NMSHelper.TWO_PI; // 2 * π
}
return wrappedAngle;
return ((angle+NMSHelper.PI) % NMSHelper.TWO_PI) -NMSHelper.PI;
}

}

0 comments on commit ee8ab53

Please sign in to comment.