-
Notifications
You must be signed in to change notification settings - Fork 1
Rounding
Kleb edited this page Mar 17, 2022
·
5 revisions
The rounding module consists of a pair of functions that extend rounding capability in Python. It is entirely inferior to the rounding functions built in to Python’s Math library.
round.ceiling(num, decPlaces)
will round the given number num
to the specified number of decimal places decPlaces
, rounding the last digit up. round.smartRound(num, decPlaces)
will round will round the given number num
to the specified number of decimal places decPlaces
, rounding the last digit up, if the digit one place after the last remaining digit is greater than or equal to 5, or down otherwise.