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