The atan2() method returns the arctangent of the quotient of its arguments. The angle returned is a numeric value between PI and -PI and represents the counterclockwise angle in radians (not degrees) between the positive X axis and the point (x, y).
This method has the form:
|x||(required) A number|
|y||(required) A number|
The following example shows the basic use of this method.
<script> document.write(Math.atan2(8,4)); </script>
This produces the following result: