Microsoft® JScript® atan2 Method |
Language Reference Version 2 |
Description
Returns the angle (in radians) from the X axis to a point (y,x).
Syntax
Math.atan2(y, x)The atan2 method syntax has these parts:
Part Description Math Required. Invokes the intrinsic Math object. x Required. A numeric expression representing the cartesian x-coordinate. y Required. A numeric expression representing the cartesian y-coordinate.
Remarks
The return value is between -pi and pi, representing the angle of the supplied (y,x) point.