Save an extra call to mirrorAngle when d == md.

This commit is contained in:
Michael Bayne
2013-02-12 14:25:20 -08:00
parent f26a72c26f
commit fef73ea027
+1 -1
View File
@@ -103,7 +103,7 @@ public class MathUtil
public static float lerpa (float a1, float a2, float t) {
float ma1 = mirrorAngle(a1), ma2 = mirrorAngle(a2);
float d = Math.abs(a2 - a1), md = Math.abs(ma1 - ma2);
return (d < md) ? lerp(a1, a2, t) : mirrorAngle(lerp(ma1, ma2, t));
return (d <= md) ? lerp(a1, a2, t) : mirrorAngle(lerp(ma1, ma2, t));
}
/**