mirrorAngle(HALF_PI) should be -HALFPI rather than HALF_PI

This commit is contained in:
Christoph Dietze
2013-02-12 22:10:04 +01:00
parent 6bdeeece12
commit 0ffabf1419
2 changed files with 20 additions and 1 deletions
+1 -1
View File
@@ -169,7 +169,7 @@ public class MathUtil
* Returns the mirror angle of the specified angle (assumed to be in [-pi, +pi]).
*/
public static float mirrorAngle (float a) {
return (a > 0f ? FloatMath.PI : -FloatMath.PI) - a;
return a + (a > 0f ? -FloatMath.PI : FloatMath.PI);
}
/**