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 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.
The return value is between -pi and pi, representing the angle of the supplied (y,x) point.