MySQL Tutorial/Math Numeric Functions/ATAN
Версия от 13:44, 26 мая 2010; (обсуждение)
ATAN(X) returns the arc tangent of X
mysql>
mysql> SELECT ATAN(2);
+-----------------+
| ATAN(2) |
+-----------------+
| 1.1071487177941 |
+-----------------+
1 row in set (0.02 sec)
mysql> SELECT ATAN(-2);
+------------------+
| ATAN(-2) |
+------------------+
| -1.1071487177941 |
+------------------+
1 row in set (0.00 sec)
mysql>
ATAN(Y,X), ATAN2(Y,X) returns the arc tangent of the two variables X and Y.
mysql>
mysql>
mysql> SELECT ATAN(-2,2);
+-------------------+
| ATAN(-2,2) |
+-------------------+
| -0.78539816339745 |
+-------------------+
1 row in set (0.00 sec)
mysql> SELECT ATAN2(PI(),0);
+-----------------+
| ATAN2(PI(),0) |
+-----------------+
| 1.5707963267949 |
+-----------------+
1 row in set (0.00 sec)
mysql>