Skip to content

Commit 74e6d76

Browse files
fix bug with dropping leading zeros on flags
1 parent 61e4251 commit 74e6d76

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

.vscode/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,8 @@
88
"rendec",
99
"schemascii",
1010
"tspan"
11-
]
11+
],
12+
"python.linting.pylintEnabled": false,
13+
"python.linting.flake8Enabled": true,
14+
"python.linting.enabled": true
1215
}

schemascii/components_render.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def inductor(
162162
data = f"M{t1.real * scale} {t1.imag * scale}"
163163
dxdy = rect(scale, angle)
164164
for _ in range(int(length)):
165-
data += f"a1 1 0 01{-dxdy.real} {dxdy.imag}"
165+
data += f"a1 1 0 01 {-dxdy.real} {dxdy.imag}"
166166
return (XML.path(
167167
d=data,
168168
stroke=options["stroke"],

schemascii/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,11 @@ def deep_transform(data, origin: complex, theta: float):
9898

9999

100100
def fix_number(n: float) -> str:
101-
"""If n is an integer, remove the trailing ".0".
101+
"""If n is an integer, remove the trailing ".0".
102102
Otherwise round it to 2 digits."""
103103
if n.is_integer():
104104
return str(int(n))
105-
return str(round(n, 4))
105+
return str(round(n, 2))
106106

107107

108108
class XMLClass:

0 commit comments

Comments
 (0)