Quote:
Originally Posted by Pierre-Marie Baty
HERE's the fix fix fix!
Code:
void UTIL_ClampAngle (float *fAngle)
{
// Whistler, TEST your bugfixes before submitting them!!! :D
if (*fAngle >= 180)
*fAngle -= 360 * ((int) (*fAngle / 360) + 1); // and not 0.5
if (*fAngle < -180)
*fAngle += 360 * ((int) (-*fAngle / 360) + 1); // and not 0.5
|
Huh ? I'm using the 0.5 thing all the time in YaPB and it works all the time. Anyway the 0.5 is INSIDE the ().