ATAN2
Descriptionβ
Returns the arc tangent of 'y' / 'x'.
Syntaxβ
ATAN2(<y>, <x>)
Parametersβ
Parameter | Description |
---|---|
<x> | The value representing the horizontal distance (coordinate) from the origin (0,0) along the x-axis. |
<y> | The value representing the vertical distance (coordinate) from the origin (0,0) along the y-axis. |
Return Valueβ
The atan2 value of parameter y
/ x
.
Exampleβ
select atan2(0.1, 0.2);
+---------------------+
| atan2(0.1, 0.2) |
+---------------------+
| 0.46364760900080609 |
+---------------------+
select atan2(1.0, 1.0);
+---------------------+
| atan2(1.0, 1.0) |
+---------------------+
| 0.78539816339744828 |
+---------------------+