summaryrefslogtreecommitdiff
path: root/gerberex/am_expression.py
diff options
context:
space:
mode:
Diffstat (limited to 'gerberex/am_expression.py')
-rw-r--r--gerberex/am_expression.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/gerberex/am_expression.py b/gerberex/am_expression.py
index 4bb1d78..5400130 100644
--- a/gerberex/am_expression.py
+++ b/gerberex/am_expression.py
@@ -49,7 +49,8 @@ class AMConstantExpression(AMExpression):
return self
def to_gerber(self, settings=None):
- return '%.6f' % self._value
+ gerber = '%.6g' % self._value
+ return '%.6f' % self._value if 'e' in gerber else gerber
def to_instructions(self):
return [(OpCode.PUSH, self._value)]