This tutorial explains how to use the MySQL ATAN function with syntax and examples.
The MySQL ATAN function returns the arc tangent of a number or returns the arc tangent of n and m.
The syntax for the ATAN function in MySQL is:
ATAN( number )
OR
ATAN( n, m )
The number used to calculate the arc tangent.
Values used to calculate the arc tangent of two values.
The ATAN function can be used in the following versions of MySQL:
Let's look at some MySQL ATAN function examples and explore how to use the ATAN function in MySQL.
For example:
mysql> SELECT ATAN(0.75);
Output: 0.6435011087932844
mysql> SELECT ATAN(-2);
Output: -1.1071487177940904
mysql> SELECT ATAN(-0.9, 2);
Output: -0.4228539261329407
mysql> SELECT ATAN(PI(), 2);
Output: 1.0038848218538872