ATAN()
This page is part of MariaDB's Documentation.
The parent of this page is: Functions for MariaDB Xpand
Topics on this page:
Overview
Returns the arc tangent angle based on a tangent slope's ratio.
USAGE
ATAN(ratio)
ATAN(opposite_length, adjacent_length)
Argument Name | Description |
---|---|
| The tangent slope's ratio |
| The lengths of the triangle's opposite sides |
| The lengths of the triangle's adjacent sides |
DETAILS
ATAN()
is a trigonometric function that returns the arc tangent angle (in radians) of a tangent slope's ratio.
When one argument is supplied, the returned angle is restricted to quadrants I and IV since it can't discriminate the identical slope ratios it would receive for angles in quadrants II and III.
When two arguments are supplied, it behaves as an alias for ATAN2().
A NULL
is returned if either argument is NULL
.
EXAMPLES
SELECT ATAN(2), ATAN(-10, -5);
+-----------------+------------------+
| ATAN(2) | ATAN(-10, -5) |
+-----------------+------------------+
| 1.1071487177941 | -2.0344439357957 |
+-----------------+------------------+
SELECT ATAN(-1);
+-------------------+
| ATAN(-1) |
+-------------------+
| -0.78539816339745 |
+-------------------+