parse float values

This commit is contained in:
xenofem 2021-11-22 20:40:53 -05:00
parent 6fec8076b4
commit 918b3bf10b

View file

@ -22,9 +22,9 @@ def parse_value(v):
suffix = v[-1].upper()
if suffix in SUFFIXES:
exponent = 3*(SUFFIXES.find(suffix)+1)
return int(v[:-1])*(10**exponent)
return float(v[:-1])*(10**exponent)
else:
return int(v)
return float(v)
def display_value(v):
suffix = ''