For my game, I had my artist send me 70+ frames of a 3D-drawn spaceship (think Donkey Kong Country or Super Mario RPG in terms of 3D graphics in a 2D environment). I wanted to capture as realistic shading/lighting as could be and I wanted to utilize her unique skills as a 3D modeler. (I say this because I know someone is going to ask why I don't just use a single image and rotate it like normal. This is why.)

I'm pinning this object with the 70+ frames to another object that will actually do all the movement and rotate as normal using the Rotate Clockwise/Counter-Clockwise actions. The angle of this object, which I call ShipBase, will determine which frame comes into play with the ShipImage object that the players will see. For instance, if the ShipBase is between angle -3 and +3, then the ShipImage will be frame 54 (which has the ship facing to the right).

As ShipBase rotates ±5 degrees, the frame of ShipImage will update to reflect the new angle range. This will not be a problem to do as I can set up two variables to calculate the Current Angle versus the Past Angle and track the overall value in the delta of the angle. However, the problem I will face is when the angle rotates "below zero". If the Current Angle is 1 and then rotates below zero, then C2 will consider the updated angle is 359 or less. When I compare the difference between Current Angle and Past Angle, this will result in a value far greater than 5 and throw off my pending system to determine when to update the frame for ShipImage. Since C2 does not actually return negative-value angles (though it can calculate them), is there any way to account for the change from positive-value angles to negative-value angles via a counter-clockwise rotation?

I don't know if this will do what you want but, instead of calculating the difference and stuff, try to every time you change the shipbase angle you set the frame of shipimage to floor(shipbase.angle/5).

This might work if you take your time to organize the frames so the 0 is the frame of the ship facing right and so on.

You can keep track of the "delta angle" using the anglediff function. It returns the smallest difference between 2 angles. i.e. 355 - 5 = 10 or 5 - 355 = 10