I am writing a tween function for a rotating turret in a 2d game. The turret is supposed to follow the mouse or get locked onto a target. All that works fine.
The issue is that when the turret loops past a full circle (TAU or 0) it will tween along the scale 0 - TAU. This means that if I am following something up past 360 degrees (to say, 15 degrees) the tween will interpolate from 360-15 instead of 360 to 375.
How do I get the tween to go past the max angle or below the min angle?