diff options
Diffstat (limited to 'src/ee/formatting')
-rw-r--r-- | src/ee/formatting/__init__.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/ee/formatting/__init__.py b/src/ee/formatting/__init__.py index 4527a96..3fa82d2 100644 --- a/src/ee/formatting/__init__.py +++ b/src/ee/formatting/__init__.py @@ -95,10 +95,6 @@ def eng_str(value, unit=None): scale = 10 ** (div3 * 3) scaled = value / scale - if (scaled - math.floor(scaled)) < 0.0001: - # if scaled == math.floor(scaled): - s = "{:1.0f}{}".format(scaled, suffix) - else: - s = "{:1.1f}{}".format(scaled, suffix) + s = "{:1.3g}{}".format(scaled, suffix) return s |