Division of Div / Quat and results are Divdient and Remainder.
Div=(Quat*Trunc)+Rem
division
@/division
Division of Div / Quat and results are Divdient and Remainder.
Div=(Quat*Trunc)+Rem
Divnumber
Divident
Quatnumber
Quatient
Remnumber
Remainder (mod)
Truncnumber
Integer Dividend (truncate)
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
#pragma XOD dirtieness disable
struct State {
};
{{ GENERATED_CODE }}
void evaluate(Context ctx) {
Number x = getValue<input_Div>(ctx);
Number y = getValue<input_Quat>(ctx);
Number xy = x / y;
emitValue<output_Trunc>(ctx, trunc(xy));
emitValue<output_Rem>(ctx, fmod(x, y));
}