MySQL RADIANS() Function

In MySQL, the RADIANS() function converts an angle measured in degrees to an approximately equivalent angle measured in radians.

If you need to convert a value from radians to degrees, use the DEGREES() function. See also the PI() function.

RADIANS() Syntax

Here is the syntax of MySQL RADIANS() function:

RADIANS(number)

Parameters

number
Required. A number representing degrees.

Return value

In MySQL, the RADIANS() function converts an angle measured in degrees to an approximately equivalent angle measured in radians.

If the parameter is NULL, the function will return NULL.

RADIANS() Examples

SELECT
    RADIANS(0),
    RADIANS(90),
    RADIANS(180),
    RADIANS(360),
    RADIANS(-90),
    RADIANS(-180),
    RADIANS(-360),
    RADIANS(NULL)\G

output

*************************** 1\. row ***************************
   RADIANS(0): 0
  RADIANS(90): 1.5707963267948966
 RADIANS(180): 3.141592653589793
 RADIANS(360): 6.283185307179586
 RADIANS(-90): -1.5707963267948966
RADIANS(-180): -3.141592653589793
RADIANS(-360): -6.283185307179586
RADIANS(NULL): NULL