round_float 0.0.9

Round `f64` and `f32` to specified number of decimals.
Documentation

This crate provides the function round_to_fraction(), which lets you round a float number to the specified number of fractions.

Example

let full_float = 12.34567;
let rounded_float = round_to_fraction(full_float, 2);
assert_eq!(rounded_float, 12.35);