MySQL ATAN2() Function
In MySQL, the ATAN2() function returns the arc tangent of two specified numbers.
ATAN2() Syntax
Here is the syntax of MySQL ATAN2() function:
ATAN2(x, y)
Parameters
x, y- Required. Two numbers.
Return value
In MySQL, the ATAN2() function returns the arc tangent of two specified numbers.
If any parameter is NULL, the ATAN2() function will return NULL.
ATAN2() Examples
SELECT
ATAN2(2.5, 1),
ATAN2(0.75, 1),
ATAN2(-0.9, 2),
ATAN2(PI(), 2),
ATAN2(NULL)\G
output
*************************** 1\. row ***************************
ATAN2(2.5, 1): 1.1902899496825317
ATAN2(0.75, 1): 0.6435011087932844
ATAN2(-0.9, 2): -0.4228539261329407
ATAN2(PI(), 2): 1.0038848218538872
ATAN2(NULL): NULL