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