cube

xod/math/cube

Computes the cube (i.e. x³) of an input value.
cube
@/cube
Computes the cube (i.e. x³) of an input value.
INnumber
cube
OUT
IN
OUTnumber

C++ implementation

#pragma XOD dirtieness disable

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

Tabular tests

INOUT
00
11
-1-1
28
-2-8
-73.5-397065.375
NaNNaN
InfInf
-Inf-Inf