dec-to-2digits

cesars/utils/dec-to-2digits

No description
dec-to-2digits
@/dec-to-2digits
INnumber
dec-to-2digits
T
U
IN
Unumber
decompose 4-digit numbers
Tnumber
To use the node in your project you should have the cesars/utils 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
#define ten 10

node {
    void evaluate(Context ctx) {
        Number y = getValue<input_IN>(ctx);
        int16_t x1 = y / ten;
        byte x = fmod(y, ten);
        emitValue<output_U>(ctx, x);
        x = fmod(x1, ten);
        emitValue<output_T>(ctx, x);
    }
}