SQLite radians() Function

The SQLite radians() function converts the specified value in degrees to radians and returns the result.

If you need to convert radians to degrees, use the degrees() function.

Syntax

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

radians(degrees)

Parameters

degrees

Required. A degree value.

Return value

The SQLite radians() function converts the specified value in degrees to radians and returns the result.

The SQLite radians() function will return NULL if the parameter is NULL.

If you provide a parameter that is not a number, the radians() function will return NULL.

Examples

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

SELECT
    radians(45),
    radians(180),
    radians(-180);
  radians(45) = 0.785398163397448
 radians(180) = 3.14159265358979
radians(-180) = -3.14159265358979