math::round
pub fn half_to_even(value: f64, scale: u8) -> f64
Round half to nearest even number.
Round value to scale number of decimal digits rounding half to nearest even number.
value
scale
use math::round; let rounded = round::half_to_even(3.14159, 3); assert_eq!(rounded, 3.142);