Embassy
embassy-rp

Crates

git

Versions

rp2040

Flavors

Function embassy_rp::rom_data::float_funcs::float_to_ufix

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

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