Skip to main content

round_f32

Function round_f32 

Source
pub const fn round_f32(value: f32) -> i32
Expand description

Rounds ties toward positive infinity, unlike f32::round, which rounds them away from zero. Uses the JDK’s IEEE 754 bit-shift implementation of Math.round(float), including saturation and NaN handling, without rounding up values just below a half-integer