If I'm given a start angle of 1.0f, and an end angle of 6.0f, then what I really want to interpolate is not the 5 in between 1 and 6, but the smaller portion. This will cause counter clockwise interpolation. How can I account of this when interpolating?
Essentially, when given 2 radian angles from 0 to 6.283, how can I know if I should interpolate clockwise or counter clockwise based on which would be "shorter"?
Thanks
Get the target angle minus starting angle. If that is greater than PI, go counterclockwise.
Invert the logic if the value is negative.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With