I'm making a stunt game, and when the character jumps I save the Transform.eulerAngles to a variable, and when it lands I calculate the difference.

However, since I'm using Unity, and it always keeps eulerAngles between 0-360, this causes a problem in the calculations. I know I need to calculate the difference and increment every frame, but what do I do when the angle reaches 360, then skips to 0.

Is there an elegant way to calculate the angle difference with this looping from 360 back to 0?