Hmm. Floyd's solution sounds right to me.
You are 'snapping' the image to the new angle, aren't you? If you gradually rotate the image to the angle, sometimes the calculation will result in the rotation going in the wrong direction, due to it trying to 'take the long way around'.
Post some code?
You are 'snapping' the image to the new angle, aren't you? If you gradually rotate the image to the angle, sometimes the calculation will result in the rotation going in the wrong direction, due to it trying to 'take the long way around'.
Post some code?