Atan2
Function |
Atan2(a, b)
|
Use
The Atan2() function returns the arctangent given x and y coordinates. This is the angle between the positive x axis and the representative line created by the origin and the given coordinates.
The inputs to Atan2() can have units, but they must be mutually compatible.
The result is given as a unitless number, but it can be converted to radians using "to rad" or degrees using "to deg". For 3rd and 4th quadrant values, the result is given as a negative value.
Atan2() does not work with complex numbers.
Examples
Atan2(1, 1) = 0.785
Atan2(-1, -1) to deg = -135 deg
Atan2(3ft, 1yd) = 0.785 rad
Atan2 is included by default in each file as part of the Math library.
See also: