General sort of question:
I'm drawing a compass and need to determine the 'shortest' direction in which to rotate the compass (clockwise or anti-clockwise) between old and new bearings (in degrees).
In most cases it is simple but when the old and new values span the 0 degree point those solutions don't work.....
Anyone got a foolproof algorithm (language doesn't matter - just the logic)
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only