AvailabilityJavaScript 1.0; JScript 1.0; ECMAScript v1 SynopsisMath.atan2(y, x) Arguments
ReturnsA value between - and radians that specifies the counterclockwise angle between the positive X-axis and the point (x, y). DescriptionThe Math.atan2( ) function computes the arc tangent of the ratio y/x. The y argument can be considered the Y-coordinate (or "rise") of a point, and the x argument can be considered the X-coordinate (or "run") of the point. Note the unusual order of the arguments to this function: the Y-coordinate is passed before the X-coordinate. |