Microsoft JScript
atan2 Method |
Language Reference
Version 2 |

Returns the angle (in radians) from the X axis to a point (y,x).

Math.atan2(y,x)The

atan2method syntax has these parts:

PartDescriptionMathRequired. Invokes the intrinsic Mathobject.xRequired. A numeric expression representing the cartesian x-coordinate. yRequired. A numeric expression representing the cartesian y-coordinate.

The return value is between-piandpi, representing the angle of the supplied (y,x) point.

Comments