## Animation Rotation Complication

My difficulty lies in rotation. If I tell it to rotate from 0 to 90 degrees, it will do this correctly. The same is true for any other numbers less than 360. The problem is, I would like it to realise that 0 and 360 are the same angle, and as such no movement is needed to change between the two. At current there is no way to do a full rotation, sending it from 360 to 0 will just make it quickly flip all the way back round.

Does anyone have any suggestions for a way to make this work? Any help would be appreciated.

Just make sure that it never goes 360 degrees.

if (angle >= 360) angle -= 360;

if (angle >= 360) angle -= 360;

[SOURCECODE]angle %= 360;[/SOURCECODE]

This will make sure 0 <= angle < 360.

Woah, that's neat. I need to learn these little C tricks.