Function round
#[must_use = "method returns a new number and does not mutate the original value"]
pub const fn round(x: f32) -> f32
Experimental version of round in core. See f32::round for details.
Examples
use f32;
let f = 3.3_f32;
let g = -3.3_f32;
let h = -3.7_f32;
let i = 3.5_f32;
let j = 4.5_f32;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
This standalone function is for testing only. It will be stabilized as an inherent method.