is-nan

koadrobot/math/is-nan

If Number is NaN, Return is True.
is-nan
@/is-nan
If Number is NaN, Return is True.
INnumber
is-nan
OUT
IN
OUTboolean
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

struct State {
};

{{ GENERATED_CODE }}

void evaluate(Context ctx) {
    auto inValue = getValue<input_IN>(ctx);
    emitValue<output_OUT>(ctx, isnan(inValue));
}

Tabular tests

INOUT
0false
10false
732.123false
-732.123false
NaNtrue
Inffalse
-Inffalse