Skip to content

Commit e928d85

Browse files
committed
v.1.0.1
1 parent cc2b65f commit e928d85

File tree

3 files changed

+13
-33
lines changed

3 files changed

+13
-33
lines changed

build/Geometrize.js

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
* Geometrize
33
* computational geometry and rendering library for JavaScript
44
*
5-
* @version 1.0.1 (2024-11-29 17:00:43)
5+
* @version 1.0.1 (2024-11-29 18:10:26)
66
* https://github.com/foo123/Geometrize
77
*
88
**//**
99
* Geometrize
1010
* computational geometry and rendering library for JavaScript
1111
*
12-
* @version 1.0.1 (2024-11-29 17:00:43)
12+
* @version 1.0.1 (2024-11-29 18:10:26)
1313
* https://github.com/foo123/Geometrize
1414
*
1515
**/
@@ -2855,22 +2855,12 @@ var CBezier = makeClass(Bezier2D, {
28552855
x1 = p[1].x, y1 = p[1].y,
28562856
x2 = p[2].x, y2 = p[2].y,
28572857
x3 = p[3].x, y3 = p[3].y,
2858-
vxx, vxy, vyx, vyy,
2859-
vzx, vzy, x, y,
2860-
s, t, rs, rp;
2858+
x, y, s, t, rs, rp;
28612859

2862-
vxx = x2 - x1;
2863-
vxy = y2 - y1;
2864-
vyx = x1 - x0;
2865-
vyy = y1 - y0;
2866-
vzx = x3 - x0;
2867-
vzy = y3 - y0;
2868-
s = solve_linear_linear_system(vxx, vyx, -vzx, vxy, vyy, -vzy);
2869-
if (!s)
2870-
{
2871-
return false;
2872-
}
2873-
x = s[0].x; y = s[0].y;
2860+
s = solve_linear_linear_system(x2 - x1, x1 - x0, -(x3 - x0), y2 - y1, y1 - y0, -(y3 - y0));
2861+
if (!s) return false;
2862+
x = s[0].x;
2863+
y = s[0].y;
28742864
if (
28752865
(x > 1) ||
28762866
(4 * y > (x + 1) * (3 - x)) ||

build/Geometrize.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/CBezier.js

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -144,22 +144,12 @@ var CBezier = makeClass(Bezier2D, {
144144
x1 = p[1].x, y1 = p[1].y,
145145
x2 = p[2].x, y2 = p[2].y,
146146
x3 = p[3].x, y3 = p[3].y,
147-
vxx, vxy, vyx, vyy,
148-
vzx, vzy, x, y,
149-
s, t, rs, rp;
147+
x, y, s, t, rs, rp;
150148

151-
vxx = x2 - x1;
152-
vxy = y2 - y1;
153-
vyx = x1 - x0;
154-
vyy = y1 - y0;
155-
vzx = x3 - x0;
156-
vzy = y3 - y0;
157-
s = solve_linear_linear_system(vxx, vyx, -vzx, vxy, vyy, -vzy);
158-
if (!s)
159-
{
160-
return false;
161-
}
162-
x = s[0].x; y = s[0].y;
149+
s = solve_linear_linear_system(x2 - x1, x1 - x0, -(x3 - x0), y2 - y1, y1 - y0, -(y3 - y0));
150+
if (!s) return false;
151+
x = s[0].x;
152+
y = s[0].y;
163153
if (
164154
(x > 1) ||
165155
(4 * y > (x + 1) * (3 - x)) ||

0 commit comments

Comments
 (0)