ID EN
Mathematical Functions

ATAN(Y,X)

MySQL 8.4 🇮🇩 Bahasa Indonesia

ATAN(Y,X), ATAN2(Y,X)

Syntax

MYSQL
SELECT ATAN(-2,2);
-0.78539816339745
SELECT ATAN2(PI(),0);
1.5707963267949

Contoh

Example

Returns the arc tangent of the two variables X and Y. It is similar to calculating the arc tangent of Y / X, except that the signs of both arguments are used to determine the quadrant of the result. Returns NULL if X or Y is NULL.

MYSQL
SELECT ATAN(-2,2);
-0.78539816339745
SELECT ATAN2(PI(),0);
1.5707963267949