ATAN2
Two-argument arc tangent function. Calculates the angle, in radians, between the specified positive x-axis value and the ray from the origin to the point (y,x)
.
Syntax
ATAN2(<value_y>,<value_x>)
Parameters
Parameter | Description | Supported input types |
---|---|---|
<value_y> | The y value in the arc tangent calculation | DOUBLE PRECISION |
<value_x> | The x value in the arc tangent calculation | DOUBLE PRECISION |
Return Type
DOUBLE PRECISION
Example
The following example calculates the arc tangent of the values 11
and 3
:
SELECT ATAN2(11,3) as result;
result (DOUBLE PRECISION) |
---|
1.3045442776439713 |