Skip to content

Commit

Permalink
Typing
Browse files Browse the repository at this point in the history
  • Loading branch information
mariocesar committed Jan 11, 2023
1 parent eb43f55 commit bce811b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bolivia_cc/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ def base10to64(number: int) -> str:
return result


def round_half_up(n, decimals=0):
multiplier = 10**decimals
def round_half_up(n: float, decimals: int = 0) -> float:
"""Round a float value to half or up."""
multiplier: int = 10**decimals
return floor(n * multiplier + 0.5) / multiplier

0 comments on commit bce811b

Please sign in to comment.