@leafer/path
Advanced tools
+4
-4
| { | ||
| "name": "@leafer/path", | ||
| "version": "1.4.0", | ||
| "version": "1.4.1", | ||
| "description": "@leafer/path", | ||
@@ -25,8 +25,8 @@ "author": "Chao (Leafer) Wan", | ||
| "dependencies": { | ||
| "@leafer/math": "1.4.0", | ||
| "@leafer/debug": "1.4.0" | ||
| "@leafer/math": "1.4.1", | ||
| "@leafer/debug": "1.4.1" | ||
| }, | ||
| "devDependencies": { | ||
| "@leafer/interface": "1.4.0" | ||
| "@leafer/interface": "1.4.1" | ||
| } | ||
| } |
@@ -81,7 +81,6 @@ import { IPathCommandData, IPointData } from '@leafer/interface' | ||
| if (lastX !== undefined) { | ||
| const maxRadius = tan(getRadianFrom(lastX, lastY, x1, y1, x2, y2) / 2) * (getMinDistanceFrom(lastX, lastY, x1, y1, x2, y2) / 2) | ||
| data.push(U, x1, y1, x2, y2, min(radius, abs(maxRadius))) | ||
| } else { | ||
| data.push(U, x1, y1, x2, y2, radius) | ||
| const d = getMinDistanceFrom(lastX, lastY, x1, y1, x2, y2) | ||
| radius = min(radius, min(d / 2, d / 2 * abs(tan(getRadianFrom(lastX, lastY, x1, y1, x2, y2) / 2)))) | ||
| } | ||
| data.push(U, x1, y1, x2, y2, radius) | ||
| }, | ||
@@ -88,0 +87,0 @@ |
60708
-0.08%1197
-0.08%+ Added
+ Added
- Removed
- Removed
Updated
Updated