Nixed mirrorAngleOrigin because it's not correct.
The correct way to mirror an angle in [-PI, PI] around the x-axis is simply to negate it, which doesn't seem ceremonious enough to require a utility method.
This commit is contained in:
@@ -30,9 +30,4 @@ public class MathUtilTest
|
||||
|
||||
assertEquals(MathUtil.lerpa(3*PI4, -3*PI4, 0.5f), -PI, MathUtil.EPSILON);
|
||||
}
|
||||
|
||||
@Test public void testMirrorAngleOrigin() {
|
||||
assertEquals(-PI2, MathUtil.mirrorAngleOrigin(PI2), MathUtil.EPSILON);
|
||||
assertEquals(PI2, MathUtil.mirrorAngleOrigin(-PI2), MathUtil.EPSILON);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user