Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def getNumDecimals(scale_factor):
- """ Get the number of decimal places based on the scale factor """
- try:
- num_decimals = int(log10(scale_factor))
- except:
- num_decimals = 0
- return num_decimals
- getNumDecimals = staticmethod(getNumDecimals)
Add Comment
Please, Sign In to add comment