Skip to content
Snippets Groups Projects
Commit cc22e812 authored by inso's avatar inso
Browse files

Remove centi and deci units (relative) #188

parent 693b0000
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,7 @@ class Relative:
@staticmethod
def to_si(value, digits):
prefixes = ['', 'd', 'c', 'm', 'µ', 'n', 'p', 'f', 'a', 'z', 'y']
prefixes = ['', 'm', 'µ', 'n', 'p', 'f', 'a', 'z', 'y']
if value < 0:
value = -value
multiplier = -1
......@@ -56,10 +56,7 @@ class Relative:
prefix = ""
while int(scientific_value) == 0 and scientific_value > 0.0:
if prefix_index > 3:
scientific_value *= 1000
else:
scientific_value *= 10
scientific_value *= 1000
prefix_index += 1
if prefix_index < len(prefixes):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment