math.deg()

Type Function
Library math.*
Return value Number
Revision Release 2022.3683
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