Navigator 2.0, Internet Explorer 3.0
Math.atan2(x, y)
The X-coordinate of the point.
The Y-coordinate of the point.
The counter-clockwise angle, measured in radians, between the positive X axis, and the point (x, y).
The Math.atan2() function performs half of the conversion between Cartesian coordinates and polar coordinates. It computes and returns the angle theta of an (x, y) point.
This function is named Math.atan2() because it performs a similar computation to Math.atan(). Math.atan2() is passed separate x and y arguments, and Math.atan() is passed the ratio of those two arguments.