sin

xod/math/sin

Calculates sine of an angle.
sin
@/sin
Calculates sine of an angle.
RADnumber
Angle in radians.
sin
OUT
RAD
OUTnumber

C++ implementation

#pragma XOD dirtieness disable

node {
    void evaluate(Context ctx) {
        Number x = getValue<input_RAD>(ctx);
        emitValue<output_OUT>(ctx, sin(x));
    }
}

Tabular tests

RADOUT
00
1.571~
-1.57-1~
0.520.5~
-0.52-0.5~
NaNNaN
InfNaN
-InfNaN