summaryrefslogtreecommitdiff
path: root/gerbonara/gerber/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'gerbonara/gerber/utils.py')
-rw-r--r--gerbonara/gerber/utils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/gerbonara/gerber/utils.py b/gerbonara/gerber/utils.py
index 5bc03e5..1aad900 100644
--- a/gerbonara/gerber/utils.py
+++ b/gerbonara/gerber/utils.py
@@ -75,6 +75,9 @@ class LengthUnit:
return unit.convert_from(self, value)
+ def format(self, value):
+ return f'{value:.3f}{self.shorthand}'
+
def __call__(self, value, unit):
return self.convert_from(unit, value)