[][src]Module finance_solution::round

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.