Expand description
Utilities for rounding money amounts to the nearest hundredth or ten-thousandth part.
Functionsยง
- assert_
rounded_ 2 - assert_
rounded_ 4 - assert_
rounded_ 6 - assert_
rounded_ 8 - round_2
- Round to two decimal places. This function uses f64::round() which rounds halfway cases away from 0.0.
- round_4
- Round to four decimal places. This function uses f64::round() which rounds halfway cases away from 0.0.
- round_6
- Round to six decimal places. This function uses f64::round() which rounds halfway cases away from 0.0.
- round_8
- Round to eight decimal places. This function uses f64::round() which rounds halfway cases away from 0.0.