[][src]Function packs::ll::types::fixed::byte_to_minus_tiny_int

pub fn byte_to_minus_tiny_int(value: u8) -> i8

Calculates from a (marker) byte the respective i8. The value of a MinusTinyInt is encoded as a 2-complement, but ranges only from 0xFF to 0xF0.

use packs::ll::types::fixed::byte_to_minus_tiny_int;
let byte : u8 = 0xFF;
assert_eq!(-1, byte_to_minus_tiny_int(byte));

Note: This function does not check, if the first nibble is 0xF0.