Function math::round::ceil [] [src]

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

Round up.

Round value up to scale number of decimal digits.

Arguments

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

Example

use math::round;

let rounded = round::ceil(3.14159, 3);
assert_eq!(rounded, 3.142);