between

e/comparison/between

Outputs true if MIN <= X <= MAX, and false otherwise
between
@/between
Outputs true if MIN <= X <= MAX, and false otherwise
Xnumber
MINnumber
MAXnumber
between
OUT
X
MIN
MAX
OUTboolean
To use the node in your project you should have the e/comparison 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) {
    auto x = getValue<input_X>(ctx);
    auto min = getValue<input_MIN>(ctx);
    auto max = getValue<input_MAX>(ctx);
    emitValue<output_OUT>(ctx, min <= x && x <= max);
}