Function rp_hal::rom_data::float_to_ufix[][src]

pub fn float_to_ufix() -> extern "C" fn(v: f32, n: i32) -> u32

Convert a float to an unsigned fixed point integer representation where n specifies the position of the binary point in the resulting fixed point representation, e.g. float_to_ufix(0.5f, 16) == 0x8000. This method rounds towards -Infinity, and clamps the resulting integer to lie within the range 0x00000000 to 0xFFFFFFFF.