parse float values

main
xenofem 2021-11-22 20:40:53 -05:00
parent 6fec8076b4
commit 918b3bf10b
1 changed files with 2 additions and 2 deletions

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 = ''