2 replaced http://upload.wikimedia.org/ with https://upload.wikimedia.org/
source | link

From the Wikipedia page:

Details of atan2 implementation http://upload.wikimedia.org/math/5/7/1/571efb70f630041f9e2b00019025171e.pngDetails of atan2 implementation

It is returning the shortest angle of rotation from the positive x direction to the point, where a positive angle indicates the counter-clockwise direction. Therefore it makes sense that it would only return values between 0 and 180, since anything greater than 180 can be 'better' approached by a smaller angle in the opposite direction.

Returning -90 instead of 270 also makes sense now, since moving 90 degrees clockwise is less than moving 270 degrees counter-clockwise to reach the same point. This also suggests that your interpretation has mixed up the positive and negative 90 degree directions but is otherwise fine.

From the Wikipedia page:

Details of atan2 implementation http://upload.wikimedia.org/math/5/7/1/571efb70f630041f9e2b00019025171e.png

It is returning the shortest angle of rotation from the positive x direction to the point, where a positive angle indicates the counter-clockwise direction. Therefore it makes sense that it would only return values between 0 and 180, since anything greater than 180 can be 'better' approached by a smaller angle in the opposite direction.

Returning -90 instead of 270 also makes sense now, since moving 90 degrees clockwise is less than moving 270 degrees counter-clockwise to reach the same point. This also suggests that your interpretation has mixed up the positive and negative 90 degree directions but is otherwise fine.

From the Wikipedia page:

Details of atan2 implementation

It is returning the shortest angle of rotation from the positive x direction to the point, where a positive angle indicates the counter-clockwise direction. Therefore it makes sense that it would only return values between 0 and 180, since anything greater than 180 can be 'better' approached by a smaller angle in the opposite direction.

Returning -90 instead of 270 also makes sense now, since moving 90 degrees clockwise is less than moving 270 degrees counter-clockwise to reach the same point. This also suggests that your interpretation has mixed up the positive and negative 90 degree directions but is otherwise fine.

1
source | link

From the Wikipedia page:

Details of atan2 implementation http://upload.wikimedia.org/math/5/7/1/571efb70f630041f9e2b00019025171e.png

It is returning the shortest angle of rotation from the positive x direction to the point, where a positive angle indicates the counter-clockwise direction. Therefore it makes sense that it would only return values between 0 and 180, since anything greater than 180 can be 'better' approached by a smaller angle in the opposite direction.

Returning -90 instead of 270 also makes sense now, since moving 90 degrees clockwise is less than moving 270 degrees counter-clockwise to reach the same point. This also suggests that your interpretation has mixed up the positive and negative 90 degree directions but is otherwise fine.