@willcgage/module-schematic 0.49.0 → 0.49.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1362,10 +1362,12 @@ function returnLoop(shape, opts) {
|
|
|
1362
1362
|
const xBot = C.x - Math.sqrt(Math.max(0, rr * rr - (-hw - C.y) ** 2));
|
|
1363
1363
|
const tTop = Math.atan2(hw - C.y, xTop - C.x);
|
|
1364
1364
|
const tBot = Math.atan2(-hw - C.y, xBot - C.x);
|
|
1365
|
+
let end = tBot;
|
|
1366
|
+
while (end >= tTop) end -= 2 * Math.PI;
|
|
1365
1367
|
return [
|
|
1366
1368
|
{ x: 0, y: hw },
|
|
1367
1369
|
{ x: xTop, y: hw },
|
|
1368
|
-
...arc(C.x, C.y, rr, tTop,
|
|
1370
|
+
...arc(C.x, C.y, rr, tTop, end, 48).slice(1, -1),
|
|
1369
1371
|
{ x: xBot, y: -hw },
|
|
1370
1372
|
{ x: 0, y: -hw }
|
|
1371
1373
|
];
|