Function tarrasque::le_f32

source ·
pub fn le_f32(bytes: &[u8]) -> f32
Expand description

Returns the first four bytes in the supplied slice as a little-endian f32.

Example

let bytes = &[219, 15, 73, 64];
assert_eq!(le_f32(bytes), std::f32::consts::PI);