ATN2 (TSQL Function)

Returns the angular part, in radians, of the polar coordinate of the point (x, y).

Syntax

ATN2 ( float_expression_y , float_expression_x )

Arguments

float_expression_y
is the y coordinate of the point. It is of type float.
float_expression_x
is the x coordinate of the point. It is of type float.

Return Types

Returns float.

Examples

PRINT ATN2(123e0, 123e0), ATN2(7e0, 2e0), ATN2(0, 1), ATN2(10, 0);

The result is:

      0.785398163397448|       1.29249666778979|                      0|        1.5707963267949|