Guest User

Untitled

a guest
May 26th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. def getNumDecimals(scale_factor):
  2. """ Get the number of decimal places based on the scale factor """
  3.  
  4. try:
  5. num_decimals = int(log10(scale_factor))
  6. except:
  7. num_decimals = 0
  8. return num_decimals
  9. getNumDecimals = staticmethod(getNumDecimals)
Add Comment
Please, Sign In to add comment