Update utils.py

This commit is contained in:
C4dmium 2019-08-01 22:25:01 +09:00 committed by GitHub
parent 2601ae8eab
commit dbd92e58c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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