Calculates the principal value of the inverse tangent.
ATAN2(y, x)
y |
- |
Any expression evaluating to a scalar, series, or table. |
x |
- |
Any expression evaluating to a scalar, series, or table. |
A scalar, series, or table, the inverse tangent of y / x.
atan(0, 1) returns 0.
atan2(1, 0) returns 1.570796, or π/2.
atan2(0, -1) returns 3.141593, or π.
atan2(-1, 0) returns -1.570796, or -π/2.
atan2(-2..0.1..2, -2..0.1..2)
returns a 41 point series where each point is the inverse tangent of the values from
The signs of y and x are used to determine the quadrant of the return value.
-π ≤ atan2(y, x) ≤ π
The function calculates in radians unless degrees are specified with the SETDEGREE function.