Math.deg
Math.deg
Function
Rotation angle in radians. Returns the corresponding angle value.
Syntax
Math.deg(radian)
Parameters
| Parameters | Type | Required | Default value | Description |
|---|---|---|---|---|
| radian | Number | Yes | None | The radian value. |
Return value
| Type | Description |
|---|---|
| Int/Float | Returns the corresponding angle value. An Int is returned for integer results, and a Float for non-integer or non-finite results. |
Example
result = Math.deg(Math.PI) // Output: 180 print result
Notes
- Equivalent to radian * 180 / PI.