Skip to content

Commit

Permalink
MyMath: avoid an extra method invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed Feb 25, 2024
1 parent c5489ca commit 44749ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion HeartLibrary/src/main/java/jme3utilities/math/MyMath.java
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public static float circle(float abscissa) {
assert Validate.inRange(abscissa, "abscissa", -1f, 1f);

double x = abscissa;
float y = (float) circle(x);
float y = (float) Math.sqrt(1.0 - x * x);

assert y >= 0f : y;
assert y <= 1f : y;
Expand Down

0 comments on commit 44749ec

Please sign in to comment.