totn MariaDB Functions

MariaDB: ATAN Function

This MariaDB tutorial explains how to use the MariaDB ATAN function with syntax and examples.

Description

The MariaDB ATAN function returns the arc tangent of a number or returns the arc tangent of n and m.

Syntax

The syntax for the ATAN function in MariaDB is:

ATAN( number )

OR

ATAN( n, m )

Parameters or Arguments

number
The number used to calculate the arc tangent.
n and m
The two values used to calculate the arc tangent.

Note

  • When using the second syntax for the ATAN function, the signs of n and m are used to determine the quadrant for the result.

Applies To

The ATAN function can be used in the following versions of MariaDB:

  • MariaDB 10

Example

Let's look at some MariaDB ATAN function examples and explore how to use the ATAN function in MariaDB.

For example:

SELECT ATAN(0.6);
Result: 0.5404195002705842

SELECT ATAN(-1.4);
Result: -0.9505468408120751

SELECT ATAN(1, 3);
Result: 0.3217505543966422

SELECT ATAN(PI(), 3);
Result: 0.808448792630022