ATAN2
Calculate arc tangent of two variables. This function returns the angle in radians between the positive x-axis and the point (X, Y).
Syntax
ATAN(Y,X), ATAN2(Y,X)Description
Examples
SELECT ATAN(-2,2);
+---------------------+
| ATAN(-2,2) |
+---------------------+
| -0.7853981633974483 |
+---------------------+
SELECT ATAN2(PI(),0);
+--------------------+
| ATAN2(PI(),0) |
+--------------------+
| 1.5707963267948966 |
+--------------------+Last updated
Was this helpful?

