math.deg()

Description:

Convert a value from radians to degrees.

Syntax:

math.deg (x)

Example:

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

Parameters:

x
A number.

Returns:

A number.

Remarks:
Supported on operating systems and platforms for build numbers shown:
  • Mac OS X:
    Corona SDK 1.0
  • Windows:
    Corona SDK 2.0
  • iOS:
    Corona SDK 1.0
  • Android:
    Corona SDK 2.0