SQLite atan2() Function

The SQLite atan2() function returns the arc tangent of the result of dividing the specified two numbers, in radians.

Syntax

Here is the syntax of the SQLite atan2() function:

atan2(x, y)

Parameters

x

Required. dividend.

y

Required. divisor.

Return value

The SQLite atan2(x, y)function returns the arc tangent of x/y.

If the parameter is NULL, the atan2() function will return NULL.

Examples

This example shows the basic usage of the SQLite atan2() function:

SELECT
    atan2(1, 0),
    atan2(1, 2),
    atan2(0, 1);
atan2(1, 0) = 1.5707963267949
atan2(1, 2) = 0.463647609000806
atan2(0, 1) = 0.0