math.deg()

Type Function
Library math.*
Return value Number
Revision 2017.3060
Keywords deg, degree
See also math.rad()

Overview

Convert a value from radians to degrees.

Syntax

math.deg( x )
x (required)

Number. An angle in radians.

Examples

print(math.deg(math.pi))        ---> 180
print(math.deg(math.pi / 2))    ---> 90
print(math.rad(180))            ---> 3.1415926535898