if(error)

koadrobot/logic/if(error)

No description
if(error)
@/if(error)
INnumber
Input value in range [-1.0, 1.0]
ERRboolean
if(error)
OUT
IN
ERR
OUTnumber
To use the node in your project you should have the koadrobot/logic 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 num = getValue<input_IN>(ctx);

    bool err = getValue<input_ERR>(ctx);

    if (err)
        raiseError<output_OUT>(ctx);
    else
        emitValue<output_OUT>(ctx, num);
}

Tabular tests

INERROUT
1trueerror
1false1