MariaDB ATAN() Function
In MariaDB, ATAN()
is a built-in numeric function that returns the arctangent of a given number.
MariaDB ATAN()
Syntax
Here is the syntax of the MariaDB ATAN()
function:
ATAN(number)
ATAN(x, y)
Parameters
number
-
Required. A numeric value used to calculate the arctangent.
x, y
-
Required. AThe two numbers are used to calculate the arctangent. The signs of
x
andy
are used to determine the quadrant of the result.
If you provide no parameters or the wrong number of parameters, MariaDB will report an error: ERROR 1582 (42000): Incorrect parameter count in the call to native function 'ATAN'
.
Return value
The MariaDB ATAN()
function returns the arctangent of the specified value.
If any number
parameters is NULL
, the ATAN()
function will return NULL
.
MariaDB ATAN()
Examples
The following statement shows the basic usage of the MariaDB ATAN()
function:
SELECT
ATAN(2.5),
ATAN(0.2),
ATAN(-0.5),
ATAN(-0.2),
ATAN(-0.9, 2),
ATAN(PI(), 2),
ATAN(NULL)\G
Output:
ATAN(2.5): 1.1902899496825317
ATAN(0.2): 0.19739555984988078
ATAN(-0.5): -0.4636476090008061
ATAN(-0.2): -0.19739555984988078
ATAN(-0.9, 2): -0.4228539261329407
ATAN(PI(), 2): 1.0038848218538872
ATAN(NULL): NULL
Conclusion
In MariaDB, ATAN()
is a built-in numeric function that returns the arctangent of a given number.