1
$\begingroup$

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?

$\endgroup$
1
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ So the docs are wrong? $\endgroup$ – Desmond Hume Jun 5 '14 at 16:41
  • $\begingroup$ You can do it anyway you want, you just need to know that it is that way by one's own definition. $\endgroup$ – King Squirrel Jun 5 '14 at 17:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.