degrees()

Learn how to use the degrees() function to convert angle values from radians to values in degrees.

Converts angle value in radians into value in degrees, using the formula degrees = (180 / PI ) * angle_in_radians.

Syntax

degrees(radians)

Parameters

NameTypeRequiredDescription
radiansreal✔️The angle in radians to convert to degrees.

Returns

Returns the corresponding angle in degrees for an angle specified in radians.

Examples

The following example shows how to convert radians to degrees.

print degrees0 = degrees(pi()/4), degrees1 = degrees(pi()*1.5), degrees2 = degrees(0)

Output

degrees0degrees1degrees2
452700