number-to-i8

xod/bits/number-to-i8

Converts number to a 8-bit signed integer presented as one byte. An input for the the conversion should be between -128.00 and 127.00.
number-to-i8
@/number-to-i8
Converts number to a 8-bit signed integer presented as one byte. An input for the the conversion should be between -128.00 and 127.00.
INnumber
number-to-i8
OUT
IN
OUTbyte

C++ implementation

node {
    void evaluate(Context ctx) {
        int8_t byte = getValue<input_IN>(ctx);
        emitValue<output_OUT>(ctx, byte);
    }
}

Tabular tests

INOUT
127.07Fh
-128.0080h
00h0.00
-1.00FFh