Created
May 1, 2017 20:23
-
-
Save conformist-mw/6d896610b7b7b948143ffe259b8aa6ce to your computer and use it in GitHub Desktop.
The old rounding behaviour
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def my_round(x): | |
return int(x + math.copysign(0.5, x)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment