acos

xod/math/acos

Calculates arc cosine.
acos
@/acos
Calculates arc cosine.
INnumber
Input value in range [-1.0, 1.0]
acos
IN
RAD
RADnumber
Result angle in radians.

C++ implementation

#pragma XOD dirtieness disable

node {
    void evaluate(Context ctx) {
        Number x = getValue<input_IN>(ctx);
        emitValue<output_RAD>(ctx, acos(x));
    }
}

Tabular tests

INRAD
01.57~
-1-3.14~
10
23NaN
NaNNaN
InfNaN
-InfNaN