Outputs either input value depending on condition
if-else(byte)
@/if-else(byte)
Deprecated: Use the generic `xod/core/if-else` instead
Outputs either input value depending on condition
Rbyte
Outputs value of `T` if `COND` is true, and `F` otherwise
#pragma XOD dirtieness disable
node {
void evaluate(Context ctx) {
auto cond = getValue<input_COND>(ctx);
auto trueVal = getValue<input_T>(ctx);
auto falseVal = getValue<input_F>(ctx);
emitValue<output_R>(ctx, cond ? trueVal : falseVal);
}
}
COND | T | F | R |
---|
false | 00h | FFh | FFh |
true | 00h | FFh | 00h |
false | 32d | 42d | 42d |
true | 00001101b | 01001100b | 00001101b |