=== Bug Fix ===

Fix for bug [ #5522 ] inaccurate rotation

Entering very high/low values using numeric input in a rotation (+/- 360000 and more/less) resulted in incorrect rotations. Fixed by clamping the actual rotation between -180 and 180 before converting to radians (just to be clear, the clamping already happened and is inevitable, now, it just happens earlier).
This commit is contained in:
Martin Poirier 2006-12-28 03:11:21 +00:00
parent 482b864a5b
commit c063e01f06

@ -1912,6 +1912,13 @@ int Rotation(TransInfo *t, short mval[2])
sprintf(str, "Rot: %s %s", &c[0], t->proptext);
/* Clamp between -180 and 180 */
while (final >= 180.0)
final -= 360.0;
while (final <= -180.0)
final += 360.0;
final *= (float)(M_PI / 180.0);
}
else {