The atan2 function and axis directions

805 Views Asked by At

In this ActionScript reference on the atan2 function, it reads:

Computes and returns the angle of the point y/x in radians, when measured counterclockwise from a circle's x axis (where 0,0 represents the center of the circle). The return value is between positive pi and negative pi. Note that the first parameter to atan2 is always the y coordinate.

For example

Math.atan2(0.7071, -0.7071)

(note that the first parameter is the Y coordinate) returns 2.356, which is positive Pi*3/4.

But in Flash graphics the Y axis goes down, not up. Shouldn't it be "clockwise" instead?

1

There are 1 best solutions below

2
On BEST ANSWER

It should be clockwise as this would yield positive angles in radians, otherwise there is a contradiction between it being counterclockwise and having positive angle measurements.