Function math::round::floor [] [src]

pub fn floor(value: f64, scale: u8) -> f64

Round down.

Round value down to scale number of decimal digits.

Arguments

  • value - value to round
  • scale - number of decimal digits

Example

use math::round;

let rounded = round::floor(3.14159, 3);
assert_eq!(rounded, 3.141);