round_float 1.1.1

Round `f64` and `f32` to specified number of decimals.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
This crate extends your float numbers (`f64` and `f32`) with the trait method `round_to_fraction()`, which lets you round the float number to a specified number of fraction digits.

# Example

```
use round_float::RoundToFraction;

let full_float = 12.34567;
let rounded_float = full_float.round_to_fraction(2);

assert_eq!(rounded_float, 12.35);
```