I need the logic how to calculate to which direction my object need to turn, clockwise/counterclockwise in the most shortest angle distance to a destination in a circle.
Let me explain.
Let's say in a circle, my object is at 20degree, my destination is at 270 degree.
Calculating the shortest angle distance is easy.
AngleDistance1 = 270-20 =250 degree.
AngleDistance2 = 360-250 =110 degree.
Then I compare AngleDistance1 and 2. The smallest result is the shortest way.
But then I don't know how to calculate/determince, to which direction should my object turn.
Should it turn 110degree clockwise or counterclockwise. By seeing is easy to say turn CW or CCW, but without eyes and only numbers, how?
I need help on this.