diff options
author | Paulo Henrique Silva <ph.silva@gmail.com> | 2019-11-25 11:30:53 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-25 11:30:53 -0300 |
commit | 2e32abef6ad46e5604cbd6f6086d857b8bc4f7be (patch) | |
tree | 6ca55a4d19f19f2db86324309a8b8abc1c1f8e37 /gerber/utils.py | |
parent | 2601ae8eab8d7be807bdbed264cd943e441a8da0 (diff) | |
parent | c08457f7addf2001f07fac5d30091b33b3ddcb0c (diff) | |
download | gerbonara-2e32abef6ad46e5604cbd6f6086d857b8bc4f7be.tar.gz gerbonara-2e32abef6ad46e5604cbd6f6086d857b8bc4f7be.tar.bz2 gerbonara-2e32abef6ad46e5604cbd6f6086d857b8bc4f7be.zip |
Merge pull request #104 from MarinMikael/allow_float_fmt_and_fix_3.7
Allow float fmt and fix 3.7
Diffstat (limited to 'gerber/utils.py')
-rw-r--r-- | gerber/utils.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gerber/utils.py b/gerber/utils.py index 817a36e..3d39df9 100644 --- a/gerber/utils.py +++ b/gerber/utils.py @@ -123,6 +123,10 @@ def write_gerber_value(value, format=(2, 5), zero_suppression='trailing'): value : string The specified value as a Gerber/Excellon-formatted string. """ + + if format[0] == float: + return "%f" %value + # Format precision integer_digits, decimal_digits = format MAX_DIGITS = integer_digits + decimal_digits |