Round an integer to a certain decimal place according to rounding mode
assert (round!(roundingMode.DOWN) (1009, 1) == 1000); assert (round!(roundingMode.UP) (1001, 1) == 1010); assert (round!(roundingMode.HALF_UP) (1005, 1) == 1010); assert (round!(roundingMode.HALF_DOWN)(1005, 1) == 1000);
See Implementation
Round an integer to a certain decimal place according to rounding mode