Converts an angle from radians to degrees.
math.todegrees multiplies radians by 180 / pi. Use it to show the result of an inverse trigonometric function in familiar units.
math.pi radians becomes 180 degrees.
Syntax
math.todegrees(radians: series int/float) -> series floatArguments
| Name | Type | Default | Description |
|---|---|---|---|
| radians | series int/ | required | The angle in radians to convert. math.pi radians becomes 180 degrees. |
Returns
series float: the angle in degrees.
Remarks
- It is the inverse of
math.toradians.
Example
//@version=6
indicator("Atan in degrees")
plot(math.todegrees(math.atan(ta.change(close))), "Angle", color = color.red)See also
Runs on Sidechair