Atan2 can return either positive or negative results, depending on which quadrant of the unit circle the angle lies.
That is probably why you think it sometimes returns strange results.
:-)
That is probably why you think it sometimes returns strange results.
:-)