Calculate total rotation?

If Im calculating total rotation.

Im basically taking my starting rotation and my current rotation and measuring the difference?

This is where I am atm but this feels totally wrong, Im going to start this again now. Im resetting the starting point which is wrong I think.

Would modulous be used to fend off the +90 or +180 wrap araound? This is kinda where Im stuck is calculating total rather than having it bounce back and forwards due to the eular angles.