ATAN2
The ATAN2 function returns the arctan value of the ratio of the input arguments; that is, the angle (in radians) whose tangent is y/x.
Syntax
ATAN (y, x)
Remarks
The table lists the valid input argument data types and the resulting output data types.
|
Data Type of y and x |
Output Type |
Notes |
|
BIGINT, DECIMAL, FLOAT, INTEGER, NUMERIC, REAL, SMALLINT, TINYINT |
FLOAT |
The input ratio y/x can range from -pi/2 to pi/2, inclusive. |
|
NULL |
NULL |
|
Example
SELECT ATAN2(-5.19615242271, -9);
The result is 0.5773502691 radians, in the third (-x, -y) quadrant.