ATN2( ) Function

Example   See Also

Returns the arc tangent in all four quadrants from specified values.

Syntax

ATN2(nYCoordinate, nXCoordinate)

Returns

Numeric

Arguments

nYCoordinate

Specifies the y coordinate.

nXCoordinate

Specifies the x coordinate.

Remarks

ATN2( ) returns the angle (in radians) between the line y = 0 and the line connecting the specified coordinates and the origin (0, 0) of the coordinate system.

ATN2( ) returns a value between  – pi/2 and +pi/2.

You can convert the value returned by ATN2( ) to degrees with RTOD( ). You can specify the number of decimal places that are displayed in the result  with SET DECIMALS.