deg2rad

koadrobot/math/deg2rad

Convert degree to radian
deg2rad
@/deg2rad
Convert degree to radian
DEGnumber
Angle in degrees.
deg2rad
RAD
DEG
RADnumber
Angle in radians.
To use the node in your project you should have the koadrobot/math library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.

C++ implementation

#pragma XOD dirtieness disable

struct State {
};

{{ GENERATED_CODE }}

void evaluate(Context ctx)
{
    Number x = getValue<input_DEG>(ctx);
    emitValue<output_RAD>(ctx, x * 0.01745329252);
}

Tabular tests

DEGRAD
NaNNaN
InfInf
-Inf-Inf
901.570796~
1803.141592~
00
3606.283185~
450.785398~
2704.712388~
10.017453~