[−][src]Module whasm::grammar::core::float
This module defines the deserialization of floating point numbers (f32
and f64
).
The WebAssembly Specification specifies that floating point numbers should be serialized using little-endian IEEE 754 encoding.
let mut iter = [0xDB, 0x0F, 0x49, 0x40].iter().copied(); let result: f32 = deserialize(&mut iter).unwrap(); assert_eq!(result, std::f32::consts::PI);