atan2(Y;X)

Returns the two-argument arctangent function (equal to atan(y/x) when x is positive) as an angle expressed in radians. (Available as of version 16.02)

Syntax

atan2(Y;X)

Input

Argument Type Description
Y any numeric type A numeric value
X any numeric type A numeric value

Return Value

Returns a decimal number corresponding to the inverse tangent, or arctangent, of Y and X. It is similar to calculating the arctangent of y/x when x is positive, except that the signs of both arguments determine the quadrant of the result.
Note: The result is a measurement in radians.

If Y is N/A, the result is N/A.

If Y and X are both 0, then atan2(Y;X) is arbitrarily defined as zero.

Sample Usage

Y X atan2(Y;X)
1 1 0.7854
-1 1 -0.7854
1 0 1.5708
NA 1 NA
0 0 0