03-29-2006, 10:09 PM
i saw this on fb,.net also. but, shouldnt it be angle += 360, regardless? because the way you have it now, -120, say, and 60, will return the same value.
angle = ( ( Atan2(v.x - u.x, -(v.y - u.y)) * (180 / PI) + 360 ) mod 360 )
not tested ;p
angle = ( ( Atan2(v.x - u.x, -(v.y - u.y)) * (180 / PI) + 360 ) mod 360 )
not tested ;p