An overview of technical problems and my solutions for them.
Friday, August 21, 2009
Angle Formula for a circle.
On a circle, if the absolute value of the difference of the angles is greater than 180, you may want to find an average angle that is no always in the clockwise direction. For instance...
angle a = 47
angle b = 326
To find the average angle in the counterclockwise direction
(((360 + a + b) / 2 ) % 360)
This will give you the correct angle between the two, in the CCW direction.
No comments:
Post a Comment