math.toradians
Converts an angle in degrees to the same angle in radians. The trigonometric functions take radians, so this is the conversion to reach for before calling them.
math.toradians(const float degrees) → const floatmath.toradians(input float degrees) → input floatmath.toradians(series float degrees) → series floatmath.toradians(simple float degrees) → simple float| Parameter | Type | Required | Description |
|---|---|---|---|
degrees | const float | yes | The angle, in degrees. |
Returns const float or input float or series float or simple float — The angle in radians, as a float in the argument’s form.
indicator("Degrees to radians")
plot(math.toradians(180))See also math.abs · math.acos · math.asin
Part of the function index.
Ready to put this into practice?
Try GoCharting Premium
Unlock advanced orderflow, market profile, options desk, and real-time data — everything you just read about, live in your charts.