DEGREES

Converts a numeric expression from radian values to degree values.

See also RADIANS.

Syntax

DEGREES( expr )

Arguments

Parameter

Description

expr

Numeric expression

Returns

When using the DEGREES floating point number scalar function, real arguments are automatically cast to double precision.

Notes

  • If the value is NULL, the result is NULL.

Examples

For these examples, consider the following table and contents:

CREATE TABLE trig(f DOUBLE);

INSERT INTO trig VALUES (0), (PI()/12), (PI()/8), (PI()/6)
   , (PI()/4), (PI()/3), (3*PI()/8), (5*PI()/12), (PI()/2);
numbers=> SELECT f, DEGREES(f) FROM trig;
f      | degrees
-------+--------
     0 |       0
0.2618 |      15
0.3927 |    22.5
0.5236 |      30
0.7854 |      45
1.0472 |      60
1.1781 |    67.5
 1.309 |      75
1.5708 |      90