Math.atan2() FunctionNameMath.atan2() Function---compute the angle from the X axis to a pointAvailabilityNavigator 2.0, Internet Explorer 3.0 Synopsis
Math.atan2(x, y) Arguments
ReturnsThe counter-clockwise angle, measured in radians, between the positive X axis, and the point (x, y). DescriptionThe 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. |
|