SQL ATN2 Function

ATN2 returns the angle between the positive x-axis and the ray from the origin to the point (y, x), where x and y are the parameter values.

The value returned is an angle measured in radians.

The angle lies between the positive x-axis and the ray from the origin to the point.

Example

#

This example returns the angle between the positive x-axis and the ray from the origin to the point (y, x), where x and y are the two parameter values.

SELECT ATN2(18.5, 135) AS 'ATN2'
Result:  1 record
ATN2
0.136188761649912

Note: The returned angle is in radians.


Syntax

Syntax of the ATN2 function.

ATN2(value1, value2)

value1 -- a number representing the positive x-axis.

value2 -- a number representing the ray from the origin to the point.


You may also like



Guides


vsn 3.1