Mega Code Archive

 
Categories / MySQL Tutorial / Math Numeric Functions
 

ATAN(Y,X), ATAN2(Y,X) returns the arc tangent of the two variables X and Y

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>