pub fn decode_f32(buf: &[u8; 5]) -> (f32, usize)
Expand description
Decodes an f32
from a buffer, returning the value and encoded length.
ยงExamples
let mut buf = [0u8; 5];
let encoded_len = vu128::encode_f32(&mut buf, 2.5);
assert_eq!(vu128::decode_f32(&buf), (2.5, encoded_len));