Skip to content

Commit

Permalink
Bump 1.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tr7zw committed Jan 4, 2024
1 parent ee8ab53 commit 661a36b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion gradle-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ source: "https://github.com/tr7zw/ProcessedModTemplate/tree/master"
replacements:
name: "NotEnoughAnimations"
id: "notenoughanimations"
version: "1.6.4"
version: "1.7.0"
description: "Adding and improving animations in Third-Person."
homepageUrl: "https://modrinth.com/mod/not-enough-animations"
sourcesUrl: "https://github.com/tr7zw/NotEnoughAnimations"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,19 +147,19 @@ public static float interpolateRotation(float start, float end, float amount) {

return wrapDegrees(wrappedStart + (wrappedEnd - wrappedStart) * amount);
}

public static float lerpAngle(float delta, float start, float end) {
float wrappedStart = wrapDegrees(start);
float wrappedEnd = wrapDegrees(end);

float difference = wrappedEnd - wrappedStart;
float shortestPath = ((difference + NMSHelper.PI) % NMSHelper.TWO_PI) - NMSHelper.PI;

return wrapDegrees(wrappedStart + shortestPath * delta);
}

public static float wrapDegrees(float angle) {
return ((angle+NMSHelper.PI) % NMSHelper.TWO_PI) -NMSHelper.PI;
return ((angle + NMSHelper.PI) % NMSHelper.TWO_PI) - NMSHelper.PI;
}

}
6 changes: 3 additions & 3 deletions src/main/java/dev/tr7zw/util/NMSHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

public class NMSHelper {

public static final float PI = (float) Math.PI;
public static final float HALF_PI = (float) (Math.PI / 2);
public static final float TWO_PI = (float) (Math.PI * 2);
public static final float PI = (float) Math.PI;
public static final float HALF_PI = (float) (Math.PI / 2);
public static final float TWO_PI = (float) (Math.PI * 2);

// spotless:off
//#if MC >= 11903
Expand Down

0 comments on commit 661a36b

Please sign in to comment.