Created
November 1, 2018 01:37
-
-
Save kzinmr/5f8ea3699466e57c04d7bf749bef771d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import math | |
def round_float(n, precision=3): | |
factor = 10**precision | |
return math.ceil(v * factor) / factor) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment