Skip to content

Commit

Permalink
Enable FAST_MATH path for sin(float) (#307)
Browse files Browse the repository at this point in the history
  • Loading branch information
httpdigest committed Dec 30, 2021
1 parent 280d561 commit 984fae3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/org/joml/Math.java
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,11 @@ static float sin_theagentd_lookup(float rad) {
}

public static float sin(float rad) {
if (Options.FASTMATH) {
if (Options.SIN_LOOKUP)
return sin_theagentd_lookup(rad);
return (float) sin_roquen_newk(rad);
}
return (float) java.lang.Math.sin(rad);
}
public static double sin(double rad) {
Expand Down

0 comments on commit 984fae3

Please sign in to comment.