pimath 0.1.25 → 0.1.26
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/pimath.js +223 -223
- package/dist/pimath.js.map +1 -1
- package/package.json +1 -1
package/dist/pimath.js
CHANGED
|
@@ -324,17 +324,17 @@ a(P, "unique", (e) => {
|
|
|
324
324
|
return t;
|
|
325
325
|
});
|
|
326
326
|
let u = P;
|
|
327
|
-
var Z, ie,
|
|
327
|
+
var Z, ie, re, Ye;
|
|
328
328
|
class vt {
|
|
329
329
|
constructor(...e) {
|
|
330
330
|
m(this, Z);
|
|
331
331
|
m(this, ie);
|
|
332
|
-
m(this,
|
|
332
|
+
m(this, re);
|
|
333
333
|
m(this, Ye);
|
|
334
334
|
// ------------------------------------------
|
|
335
335
|
// Creation / parsing functions
|
|
336
336
|
// ------------------------------------------
|
|
337
|
-
a(this, "parse", (e, t, i) => (h(this,
|
|
337
|
+
a(this, "parse", (e, t, i) => (h(this, re, i ?? 1), h(this, ie, t ?? 2), h(this, Z, e), s(this, ie) % 2 === 0 && s(this, Z) < 0 && h(this, Ye, !1), this));
|
|
338
338
|
// ------------------------------------------
|
|
339
339
|
// Mathematical operations
|
|
340
340
|
// ------------------------------------------
|
|
@@ -342,7 +342,7 @@ class vt {
|
|
|
342
342
|
let e = Math.floor(Math.pow(s(this, Z), 1 / s(this, ie)));
|
|
343
343
|
for (; e > 1; ) {
|
|
344
344
|
if (s(this, Z) % Math.pow(e, s(this, ie)) === 0) {
|
|
345
|
-
h(this,
|
|
345
|
+
h(this, re, s(this, re) * e), h(this, Z, s(this, Z) / Math.pow(e, s(this, ie))), e = Math.floor(Math.pow(s(this, Z), 1 / s(this, ie)));
|
|
346
346
|
continue;
|
|
347
347
|
}
|
|
348
348
|
e--;
|
|
@@ -354,7 +354,7 @@ class vt {
|
|
|
354
354
|
// Help functions
|
|
355
355
|
// ------------------------------------------
|
|
356
356
|
a(this, "hasRadical", () => !(s(this, Z) === 1 || s(this, Z) === 0 || !s(this, Ye)));
|
|
357
|
-
h(this, Z, 1), h(this,
|
|
357
|
+
h(this, Z, 1), h(this, re, 1), h(this, ie, 2), h(this, Ye, !0), e.length > 0 && this.parse(e[0], e[1], e[2]);
|
|
358
358
|
}
|
|
359
359
|
// ------------------------------------------
|
|
360
360
|
// Getter and setter
|
|
@@ -372,24 +372,24 @@ class vt {
|
|
|
372
372
|
Number.isSafeInteger(e) && e >= 2 ? h(this, ie, e) : (console.log("Error setting the nth root"), h(this, ie, 2));
|
|
373
373
|
}
|
|
374
374
|
get coefficient() {
|
|
375
|
-
return s(this,
|
|
375
|
+
return s(this, re);
|
|
376
376
|
}
|
|
377
377
|
set coefficient(e) {
|
|
378
|
-
h(this,
|
|
378
|
+
h(this, re, e);
|
|
379
379
|
}
|
|
380
380
|
get tex() {
|
|
381
381
|
let e;
|
|
382
|
-
return s(this,
|
|
382
|
+
return s(this, re) === 1 ? e = "" : s(this, re) === -1 ? e = "-" : e = s(this, re).toString(), s(this, Z) === 1 ? `${s(this, re)}` : s(this, ie) === 2 ? `${e}\\sqrt{${s(this, Z)}}` : `${e}\\sqrt[${s(this, ie)}]{${s(this, Z)}}`;
|
|
383
383
|
}
|
|
384
384
|
get display() {
|
|
385
385
|
let e;
|
|
386
|
-
return s(this,
|
|
386
|
+
return s(this, re) === 1 ? e = "" : s(this, re) === -1 ? e = "-" : e = s(this, re).toString(), s(this, Z) === 1 ? `${s(this, re)}` : s(this, ie) === 2 ? `${e}sqrt{${s(this, Z)}}` : `${e}root(${s(this, ie)}){${s(this, Z)}}`;
|
|
387
387
|
}
|
|
388
388
|
get value() {
|
|
389
|
-
return s(this,
|
|
389
|
+
return s(this, re) * Math.pow(s(this, Z), 1 / s(this, ie));
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
|
-
Z = new WeakMap(), ie = new WeakMap(),
|
|
392
|
+
Z = new WeakMap(), ie = new WeakMap(), re = new WeakMap(), Ye = new WeakMap();
|
|
393
393
|
var K, Fe, C, Ge, ge, vi, bi, xi, Ei, Ni, Ai, Ti;
|
|
394
394
|
const pi = class pi {
|
|
395
395
|
constructor(e, t, i = "x") {
|
|
@@ -661,10 +661,10 @@ const Ji = {
|
|
|
661
661
|
"!": { precedence: 4, associative: "right", type: g.OPERATION },
|
|
662
662
|
"-": { precedence: 2, associative: "left", type: g.OPERATION }
|
|
663
663
|
};
|
|
664
|
-
var He, at,
|
|
664
|
+
var He, at, ne, bt, Ve;
|
|
665
665
|
class Kt {
|
|
666
666
|
constructor(e) {
|
|
667
|
-
ot(this, He), ot(this, at, []), ot(this,
|
|
667
|
+
ot(this, He), ot(this, at, []), ot(this, ne, {}), ot(this, bt, []), ot(this, Ve), Ee(this, He, typeof e > "u" ? Ze.POLYNOM : e), this.tokenConfigInitialization();
|
|
668
668
|
}
|
|
669
669
|
// Getter
|
|
670
670
|
get rpn() {
|
|
@@ -674,7 +674,7 @@ class Kt {
|
|
|
674
674
|
return te(this, at).map((e) => e.token);
|
|
675
675
|
}
|
|
676
676
|
tokenConfigInitialization() {
|
|
677
|
-
return te(this, He) === Ze.SET ? (Ee(this,
|
|
677
|
+
return te(this, He) === Ze.SET ? (Ee(this, ne, ts), Ee(this, Ve, !1)) : te(this, He) === Ze.NUMERIC ? (Ee(this, ne, es), Ee(this, Ve, !0)) : te(this, He) === Ze.EXPRESSION ? (Ee(this, ne, _i), Ee(this, Ve, !0)) : (Ee(this, ne, Ji), Ee(this, Ve, !0)), Ee(this, bt, Object.keys(te(this, ne)).sort((e, t) => t.length - e.length)), te(this, ne);
|
|
678
678
|
}
|
|
679
679
|
/**
|
|
680
680
|
* Get the next token to analyse.
|
|
@@ -692,7 +692,7 @@ class Kt {
|
|
|
692
692
|
else {
|
|
693
693
|
for (const r of te(this, bt))
|
|
694
694
|
if (e.substring(t, t + r.length) === r) {
|
|
695
|
-
i += r, n = te(this,
|
|
695
|
+
i += r, n = te(this, ne)[r].type;
|
|
696
696
|
break;
|
|
697
697
|
}
|
|
698
698
|
for (const r in fi)
|
|
@@ -723,7 +723,7 @@ class Kt {
|
|
|
723
723
|
parse(e, t) {
|
|
724
724
|
const i = [], n = [];
|
|
725
725
|
let r = "", l = 0, c;
|
|
726
|
-
(t ?? te(this, Ve)) && (e = Qi(e, te(this,
|
|
726
|
+
(t ?? te(this, Ve)) && (e = Qi(e, te(this, ne)));
|
|
727
727
|
const f = 50;
|
|
728
728
|
let d = 50, p;
|
|
729
729
|
for (; l < e.length; ) {
|
|
@@ -744,9 +744,9 @@ class Kt {
|
|
|
744
744
|
case g.OPERATION:
|
|
745
745
|
if (n.length > 0) {
|
|
746
746
|
let w = n[n.length - 1];
|
|
747
|
-
for (p = +f; w.token in te(this,
|
|
748
|
-
(te(this,
|
|
749
|
-
te(this,
|
|
747
|
+
for (p = +f; w.token in te(this, ne) && //either o1 is left-associative and its precedence is less than or equal to that of o2,
|
|
748
|
+
(te(this, ne)[r].associative === "left" && te(this, ne)[r].precedence <= te(this, ne)[w.token].precedence || //or o1 is right associative, and has precedence less than that of o2,
|
|
749
|
+
te(this, ne)[r].associative === "right" && te(this, ne)[r].precedence < te(this, ne)[w.token].precedence); ) {
|
|
750
750
|
if (p--, p === 0) {
|
|
751
751
|
console.log("SECURITY LEVEL 2 OPERATION EXIT");
|
|
752
752
|
break;
|
|
@@ -790,7 +790,7 @@ class Kt {
|
|
|
790
790
|
return Ee(this, at, i.concat(n.reverse())), this;
|
|
791
791
|
}
|
|
792
792
|
}
|
|
793
|
-
He = /* @__PURE__ */ new WeakMap(), at = /* @__PURE__ */ new WeakMap(),
|
|
793
|
+
He = /* @__PURE__ */ new WeakMap(), at = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakMap(), bt = /* @__PURE__ */ new WeakMap(), Ve = /* @__PURE__ */ new WeakMap();
|
|
794
794
|
class is {
|
|
795
795
|
constructor(e, t) {
|
|
796
796
|
ei(this, "_rpn"), ei(this, "_expression"), ei(this, "_isValid"), this._expression = e;
|
|
@@ -891,7 +891,7 @@ class is {
|
|
|
891
891
|
return +e.toFixed(t);
|
|
892
892
|
}
|
|
893
893
|
}
|
|
894
|
-
var T, b, Qe, xt, ze,
|
|
894
|
+
var T, b, Qe, xt, ze, kt, Mt;
|
|
895
895
|
const I = class I {
|
|
896
896
|
constructor(e) {
|
|
897
897
|
m(this, Qe);
|
|
@@ -1146,7 +1146,7 @@ const I = class I {
|
|
|
1146
1146
|
}
|
|
1147
1147
|
return t;
|
|
1148
1148
|
});
|
|
1149
|
-
m(this,
|
|
1149
|
+
m(this, kt, (e) => {
|
|
1150
1150
|
const i = new Kt().parse(e).rpn, n = [];
|
|
1151
1151
|
if (i.length === 0)
|
|
1152
1152
|
return this.zero(), this;
|
|
@@ -1155,10 +1155,10 @@ const I = class I {
|
|
|
1155
1155
|
return this.one(), r.tokenType === g.COEFFICIENT ? this.coefficient = new u(r.token) : r.tokenType === g.VARIABLE && this.setLetter(r.token, 1), this;
|
|
1156
1156
|
} else
|
|
1157
1157
|
for (const r of i)
|
|
1158
|
-
s(this,
|
|
1158
|
+
s(this, Mt).call(this, n, r);
|
|
1159
1159
|
return this.one(), this.multiply(n[0]), this;
|
|
1160
1160
|
});
|
|
1161
|
-
m(this,
|
|
1161
|
+
m(this, Mt, (e, t) => {
|
|
1162
1162
|
var f;
|
|
1163
1163
|
let i, n, r, l, c;
|
|
1164
1164
|
if (t.tokenType === g.COEFFICIENT)
|
|
@@ -1191,7 +1191,7 @@ const I = class I {
|
|
|
1191
1191
|
* @param inputStr
|
|
1192
1192
|
*/
|
|
1193
1193
|
parse(e) {
|
|
1194
|
-
return h(this, T, new u()), h(this, b, {}), typeof e == "string" ? s(this,
|
|
1194
|
+
return h(this, T, new u()), h(this, b, {}), typeof e == "string" ? s(this, kt).call(this, e) : typeof e == "number" ? h(this, T, new u(e)) : e instanceof u ? h(this, T, e.clone()) : e instanceof I && (h(this, T, s(e, T).clone()), A(this, Qe, xt).call(this, e)), this;
|
|
1195
1195
|
}
|
|
1196
1196
|
/**
|
|
1197
1197
|
* Get the coefficient \\(k\\) of the Monom \\(k\\cdot x^{n}\\)
|
|
@@ -1340,7 +1340,7 @@ const I = class I {
|
|
|
1340
1340
|
T = new WeakMap(), b = new WeakMap(), Qe = new WeakSet(), xt = function(e) {
|
|
1341
1341
|
for (const t in e.literal)
|
|
1342
1342
|
s(this, b)[t] = e.literal[t].clone();
|
|
1343
|
-
}, ze = new WeakMap(),
|
|
1343
|
+
}, ze = new WeakMap(), kt = new WeakMap(), Mt = new WeakMap(), a(I, "gcd", (...e) => {
|
|
1344
1344
|
for (const r of e)
|
|
1345
1345
|
if (r.containsRationalPower())
|
|
1346
1346
|
return new I().zero();
|
|
@@ -1363,14 +1363,14 @@ a(I, "xMultiply", (...e) => {
|
|
|
1363
1363
|
t.multiply(i);
|
|
1364
1364
|
return t;
|
|
1365
1365
|
});
|
|
1366
|
-
let
|
|
1366
|
+
let M = I;
|
|
1367
1367
|
function yi(o, e = !0) {
|
|
1368
1368
|
return e ? `\\left( ${o} \\right)` : `(${o})`;
|
|
1369
1369
|
}
|
|
1370
1370
|
function Et(o, e, t, i, n) {
|
|
1371
1371
|
return o.map((r, l) => r === e ? t : r);
|
|
1372
1372
|
}
|
|
1373
|
-
var je, y, Ke, ft, Je, dt, Ct, $t, Pt, _e, It, pt,
|
|
1373
|
+
var je, y, Ke, ft, Je, dt, Ct, $t, Pt, _e, It, pt, St, Bt, Rt, zt, ki, Lt, Vt;
|
|
1374
1374
|
const $ = class $ {
|
|
1375
1375
|
constructor(e, ...t) {
|
|
1376
1376
|
m(this, zt);
|
|
@@ -1385,12 +1385,12 @@ const $ = class $ {
|
|
|
1385
1385
|
*/
|
|
1386
1386
|
a(this, "parse", (e, ...t) => {
|
|
1387
1387
|
if (h(this, y, []), h(this, je, []), typeof e == "string")
|
|
1388
|
-
return A(this, zt,
|
|
1389
|
-
if ((typeof e == "number" || e instanceof u || e instanceof
|
|
1390
|
-
s(this, y).push(new
|
|
1391
|
-
else if (e instanceof
|
|
1392
|
-
s(this, y).push(new
|
|
1393
|
-
s(this, y).push(new
|
|
1388
|
+
return A(this, zt, ki).call(this, e, ...t);
|
|
1389
|
+
if ((typeof e == "number" || e instanceof u || e instanceof M) && t.length === 0)
|
|
1390
|
+
s(this, y).push(new M(e));
|
|
1391
|
+
else if (e instanceof M && t.length > 0)
|
|
1392
|
+
s(this, y).push(new M(e)), t.forEach((i) => {
|
|
1393
|
+
s(this, y).push(new M(i));
|
|
1394
1394
|
});
|
|
1395
1395
|
else if (e instanceof $)
|
|
1396
1396
|
for (const i of e.monoms)
|
|
@@ -1408,11 +1408,11 @@ const $ = class $ {
|
|
|
1408
1408
|
});
|
|
1409
1409
|
a(this, "add", (...e) => {
|
|
1410
1410
|
for (const t of e)
|
|
1411
|
-
t instanceof $ ? h(this, y, s(this, y).concat(t.monoms)) : t instanceof
|
|
1411
|
+
t instanceof $ ? h(this, y, s(this, y).concat(t.monoms)) : t instanceof M ? s(this, y).push(t.clone()) : typeof t == "number" && Number.isSafeInteger(t) ? s(this, y).push(new M(t.toString())) : s(this, y).push(new M(t));
|
|
1412
1412
|
return this.reduce();
|
|
1413
1413
|
});
|
|
1414
1414
|
a(this, "commonMonom", () => {
|
|
1415
|
-
const e = new
|
|
1415
|
+
const e = new M().one(), t = this.gcdNumerator(), i = this.gcdDenominator(), n = this.degree();
|
|
1416
1416
|
e.coefficient = new u(t, i);
|
|
1417
1417
|
for (const r of this.variables) {
|
|
1418
1418
|
e.setLetter(r, n);
|
|
@@ -1439,7 +1439,7 @@ const $ = class $ {
|
|
|
1439
1439
|
return s(this, dt).call(this, e);
|
|
1440
1440
|
if (typeof e == "number" && Number.isSafeInteger(e))
|
|
1441
1441
|
return s(this, Ct).call(this, e);
|
|
1442
|
-
if (e instanceof
|
|
1442
|
+
if (e instanceof M)
|
|
1443
1443
|
return this.divide(new $(e));
|
|
1444
1444
|
if (e instanceof $) {
|
|
1445
1445
|
if (e.monoms.length === 1 && e.variables.length === 0)
|
|
@@ -1595,7 +1595,7 @@ const $ = class $ {
|
|
|
1595
1595
|
for (const n of s(i, y))
|
|
1596
1596
|
if (n.degree(t).isEqual(e))
|
|
1597
1597
|
return n.clone();
|
|
1598
|
-
return new
|
|
1598
|
+
return new M().zero();
|
|
1599
1599
|
});
|
|
1600
1600
|
// Used in LinearSystem.tex
|
|
1601
1601
|
a(this, "monomByLetter", (e) => {
|
|
@@ -1603,7 +1603,7 @@ const $ = class $ {
|
|
|
1603
1603
|
for (const i of s(t, y))
|
|
1604
1604
|
if (i.hasVariable(e))
|
|
1605
1605
|
return i.clone();
|
|
1606
|
-
return new
|
|
1606
|
+
return new M().zero();
|
|
1607
1607
|
});
|
|
1608
1608
|
a(this, "monomsByDegree", (e, t) => {
|
|
1609
1609
|
if (e === void 0)
|
|
@@ -1613,8 +1613,8 @@ const $ = class $ {
|
|
|
1613
1613
|
r.degree(t).isEqual(e) && i.push(r.clone());
|
|
1614
1614
|
return i;
|
|
1615
1615
|
});
|
|
1616
|
-
a(this, "multiply", (e) => e instanceof $ ? s(this, Rt).call(this, e) : e instanceof u ? s(this, pt).call(this, e) : e instanceof
|
|
1617
|
-
a(this, "one", () => (h(this, y, []), s(this, y).push(new
|
|
1616
|
+
a(this, "multiply", (e) => e instanceof $ ? s(this, Rt).call(this, e) : e instanceof u ? s(this, pt).call(this, e) : e instanceof M ? s(this, Bt).call(this, e) : Number.isSafeInteger(e) && typeof e == "number" ? s(this, St).call(this, e) : this);
|
|
1617
|
+
a(this, "one", () => (h(this, y, []), s(this, y).push(new M().one()), this));
|
|
1618
1618
|
// ------------------------------------------
|
|
1619
1619
|
a(this, "opposite", () => (h(this, y, s(this, y).map((e) => e.opposite())), this));
|
|
1620
1620
|
a(this, "pow", (e) => {
|
|
@@ -1639,7 +1639,7 @@ const $ = class $ {
|
|
|
1639
1639
|
let e = 0;
|
|
1640
1640
|
for (; e < s(this, y).length; ) {
|
|
1641
1641
|
for (let t = e + 1; t < s(this, y).length; t++)
|
|
1642
|
-
s(this, y)[e].isSameAs(s(this, y)[t]) && (s(this, y)[e].add(s(this, y)[t]), s(this, y).splice(t, 1), s(this, y)[e].isZero() && (s(this, y)[e] = new
|
|
1642
|
+
s(this, y)[e].isSameAs(s(this, y)[t]) && (s(this, y)[e].add(s(this, y)[t]), s(this, y).splice(t, 1), s(this, y)[e].isZero() && (s(this, y)[e] = new M().zero()), t--);
|
|
1643
1643
|
e++;
|
|
1644
1644
|
}
|
|
1645
1645
|
h(this, y, s(this, y).filter((t) => !t.coefficient.isZero()));
|
|
@@ -1678,14 +1678,14 @@ const $ = class $ {
|
|
|
1678
1678
|
});
|
|
1679
1679
|
a(this, "subtract", (...e) => {
|
|
1680
1680
|
for (const t of e)
|
|
1681
|
-
t instanceof $ ? this.add(t.clone().opposite()) : t instanceof
|
|
1681
|
+
t instanceof $ ? this.add(t.clone().opposite()) : t instanceof M ? s(this, y).push(t.clone().opposite()) : s(this, y).push(new M(t).opposite());
|
|
1682
1682
|
return this.reduce();
|
|
1683
1683
|
});
|
|
1684
1684
|
/**
|
|
1685
1685
|
* Set the polynom to zero.
|
|
1686
1686
|
* @returns {this}
|
|
1687
1687
|
*/
|
|
1688
|
-
a(this, "zero", () => (h(this, y, []), s(this, y).push(new
|
|
1688
|
+
a(this, "zero", () => (h(this, y, []), s(this, y).push(new M().zero()), this));
|
|
1689
1689
|
m(this, Je, (e, t) => {
|
|
1690
1690
|
t === void 0 && (t = "=");
|
|
1691
1691
|
const i = this.clone().reduce().reorder(), n = e.clone().reduce().reorder();
|
|
@@ -1761,8 +1761,8 @@ const $ = class $ {
|
|
|
1761
1761
|
t.coefficient.multiply(e);
|
|
1762
1762
|
return this.reduce();
|
|
1763
1763
|
});
|
|
1764
|
-
m(this,
|
|
1765
|
-
m(this,
|
|
1764
|
+
m(this, St, (e) => s(this, pt).call(this, new u(e)));
|
|
1765
|
+
m(this, Bt, (e) => {
|
|
1766
1766
|
for (const t of s(this, y))
|
|
1767
1767
|
t.multiply(e);
|
|
1768
1768
|
return this.reduce();
|
|
@@ -1771,7 +1771,7 @@ const $ = class $ {
|
|
|
1771
1771
|
const t = [];
|
|
1772
1772
|
for (const i of s(this, y))
|
|
1773
1773
|
for (const n of e.monoms)
|
|
1774
|
-
t.push(
|
|
1774
|
+
t.push(M.xMultiply(i, n));
|
|
1775
1775
|
return h(this, y, t), this.reduce();
|
|
1776
1776
|
});
|
|
1777
1777
|
/**
|
|
@@ -1792,7 +1792,7 @@ const $ = class $ {
|
|
|
1792
1792
|
e.push(new $(t.token));
|
|
1793
1793
|
break;
|
|
1794
1794
|
case g.VARIABLE:
|
|
1795
|
-
e.push(new $().add(new
|
|
1795
|
+
e.push(new $().add(new M(t.token)));
|
|
1796
1796
|
break;
|
|
1797
1797
|
case g.CONSTANT:
|
|
1798
1798
|
console.log("Actually, not supported - will be added later !");
|
|
@@ -1848,7 +1848,7 @@ const $ = class $ {
|
|
|
1848
1848
|
h(this, y, []);
|
|
1849
1849
|
const t = "x";
|
|
1850
1850
|
return e.reverse().forEach((i, n) => {
|
|
1851
|
-
const r = new
|
|
1851
|
+
const r = new M();
|
|
1852
1852
|
r.coefficient = new u(i), r.setLetter(t, n), s(this, y).push(r);
|
|
1853
1853
|
}), this;
|
|
1854
1854
|
}
|
|
@@ -1930,11 +1930,11 @@ const $ = class $ {
|
|
|
1930
1930
|
return this.getZeroes();
|
|
1931
1931
|
}
|
|
1932
1932
|
};
|
|
1933
|
-
je = new WeakMap(), y = new WeakMap(), Ke = new WeakMap(), ft = new WeakMap(), Je = new WeakMap(), dt = new WeakMap(), Ct = new WeakMap(), $t = new WeakMap(), Pt = new WeakMap(), _e = new WeakMap(), It = new WeakMap(), pt = new WeakMap(),
|
|
1933
|
+
je = new WeakMap(), y = new WeakMap(), Ke = new WeakMap(), ft = new WeakMap(), Je = new WeakMap(), dt = new WeakMap(), Ct = new WeakMap(), $t = new WeakMap(), Pt = new WeakMap(), _e = new WeakMap(), It = new WeakMap(), pt = new WeakMap(), St = new WeakMap(), Bt = new WeakMap(), Rt = new WeakMap(), zt = new WeakSet(), ki = function(e, ...t) {
|
|
1934
1934
|
if (t.length === 0) {
|
|
1935
1935
|
if (e = "" + e, e !== "" && !isNaN(Number(e))) {
|
|
1936
1936
|
this.empty();
|
|
1937
|
-
const i = new
|
|
1937
|
+
const i = new M(e);
|
|
1938
1938
|
return this.add(i), this;
|
|
1939
1939
|
}
|
|
1940
1940
|
return s(this, Lt).call(this, e);
|
|
@@ -1947,13 +1947,13 @@ je = new WeakMap(), y = new WeakMap(), Ke = new WeakMap(), ft = new WeakMap(), J
|
|
|
1947
1947
|
throw new Error("Too many factors for too few variables !");
|
|
1948
1948
|
let r = 0;
|
|
1949
1949
|
for (const l of i) {
|
|
1950
|
-
const c = new
|
|
1950
|
+
const c = new M();
|
|
1951
1951
|
c.coefficient = l.clone(), c.literalStr = n[r] || "", this.add(c), r++;
|
|
1952
1952
|
}
|
|
1953
1953
|
} else {
|
|
1954
1954
|
let n = i.length - 1;
|
|
1955
1955
|
for (const r of i) {
|
|
1956
|
-
const l = new
|
|
1956
|
+
const l = new M();
|
|
1957
1957
|
l.coefficient = r.clone(), l.literalStr = `${e}^${n}`, this.add(l), n--;
|
|
1958
1958
|
}
|
|
1959
1959
|
}
|
|
@@ -1962,15 +1962,15 @@ je = new WeakMap(), y = new WeakMap(), Ke = new WeakMap(), ft = new WeakMap(), J
|
|
|
1962
1962
|
return this.zero();
|
|
1963
1963
|
}, Lt = new WeakMap(), Vt = new WeakMap();
|
|
1964
1964
|
let O = $;
|
|
1965
|
-
var q,
|
|
1965
|
+
var q, k, oe, Dt, et, Zt;
|
|
1966
1966
|
const Ne = class Ne {
|
|
1967
1967
|
constructor(e, t, i) {
|
|
1968
1968
|
// Left part of the equation
|
|
1969
1969
|
m(this, q);
|
|
1970
1970
|
// Right part of the equation
|
|
1971
|
-
m(this,
|
|
1971
|
+
m(this, k);
|
|
1972
1972
|
// Signe of the equation
|
|
1973
|
-
m(this,
|
|
1973
|
+
m(this, oe);
|
|
1974
1974
|
// ------------------------------------------
|
|
1975
1975
|
a(this, "parse", (e) => {
|
|
1976
1976
|
const t = s(this, Dt).call(this, e);
|
|
@@ -1979,13 +1979,13 @@ const Ne = class Ne {
|
|
|
1979
1979
|
const i = e.split(t);
|
|
1980
1980
|
return this.create(new O(i[0]), new O(i[1]), s(this, et).call(this, t));
|
|
1981
1981
|
});
|
|
1982
|
-
a(this, "create", (e, t, i) => (h(this, q, e), h(this,
|
|
1983
|
-
a(this, "clone", () => new Ne(s(this, q).clone(), s(this,
|
|
1982
|
+
a(this, "create", (e, t, i) => (h(this, q, e), h(this, k, t), h(this, oe, s(this, et).call(this, i ?? "=")), this));
|
|
1983
|
+
a(this, "clone", () => new Ne(s(this, q).clone(), s(this, k).clone(), s(this, oe)));
|
|
1984
1984
|
/**
|
|
1985
1985
|
* Get the degree of the equation
|
|
1986
1986
|
* @param letter
|
|
1987
1987
|
*/
|
|
1988
|
-
a(this, "degree", (e) => u.max(s(this, q).degree(e), s(this,
|
|
1988
|
+
a(this, "degree", (e) => u.max(s(this, q).degree(e), s(this, k).degree(e)));
|
|
1989
1989
|
/**
|
|
1990
1990
|
* divide an equation by a given value (transformed as a fraction)
|
|
1991
1991
|
*
|
|
@@ -2016,7 +2016,7 @@ const Ne = class Ne {
|
|
|
2016
2016
|
/**
|
|
2017
2017
|
* Determine if the equation contains more than one letter/variable.
|
|
2018
2018
|
*/
|
|
2019
|
-
a(this, "isMultiVariable", () => s(this, q).isMultiVariable || s(this,
|
|
2019
|
+
a(this, "isMultiVariable", () => s(this, q).isMultiVariable || s(this, k).isMultiVariable);
|
|
2020
2020
|
// -----------------------------------------------
|
|
2021
2021
|
// Equations helpers
|
|
2022
2022
|
a(this, "isEqualTo", (e) => {
|
|
@@ -2031,43 +2031,43 @@ const Ne = class Ne {
|
|
|
2031
2031
|
if (!this.degree(e).isOne() || this.isMultiVariable())
|
|
2032
2032
|
return !1;
|
|
2033
2033
|
let t;
|
|
2034
|
-
s(this, q).subtract(s(this,
|
|
2034
|
+
s(this, q).subtract(s(this, k)), s(this, k).zero();
|
|
2035
2035
|
const i = [...s(this, q).monoms];
|
|
2036
2036
|
for (const r of i)
|
|
2037
|
-
r.hasVariable(e) || (t = r.clone(), s(this, q).subtract(t), s(this,
|
|
2037
|
+
r.hasVariable(e) || (t = r.clone(), s(this, q).subtract(t), s(this, k).subtract(t));
|
|
2038
2038
|
if (s(this, q).length !== 1)
|
|
2039
2039
|
return !1;
|
|
2040
2040
|
const n = s(this, q).monoms[0].coefficient.clone();
|
|
2041
|
-
return s(this, q).divide(n), s(this,
|
|
2041
|
+
return s(this, q).divide(n), s(this, k).divide(n), this;
|
|
2042
2042
|
});
|
|
2043
2043
|
// -----------------------------------------------
|
|
2044
2044
|
// Equations operations
|
|
2045
2045
|
// -----------------------------------------------
|
|
2046
|
-
a(this, "letters", () => [.../* @__PURE__ */ new Set([...s(this, q).letters(), ...s(this,
|
|
2046
|
+
a(this, "letters", () => [.../* @__PURE__ */ new Set([...s(this, q).letters(), ...s(this, k).letters()])]);
|
|
2047
2047
|
// -----------------------------------------------
|
|
2048
2048
|
/**
|
|
2049
2049
|
* Reorder will move all monoms containing a letter on the left, all the other on the right.
|
|
2050
2050
|
*/
|
|
2051
|
-
a(this, "moveLeft", () => (s(this, q).subtract(s(this,
|
|
2051
|
+
a(this, "moveLeft", () => (s(this, q).subtract(s(this, k)), s(this, k).zero(), this));
|
|
2052
2052
|
/**
|
|
2053
2053
|
* Multiple an equation by a fraction value.
|
|
2054
2054
|
* @param value
|
|
2055
2055
|
*/
|
|
2056
2056
|
a(this, "multiply", (e) => {
|
|
2057
2057
|
const t = new u(e);
|
|
2058
|
-
return s(this, q).multiply(t), s(this,
|
|
2058
|
+
return s(this, q).multiply(t), s(this, k).multiply(t), s(this, oe) !== "=" && t.sign() === -1 && s(this, Zt).call(this), this;
|
|
2059
2059
|
});
|
|
2060
|
-
a(this, "opposite", () => (h(this, q, s(this, q).opposite()), h(this,
|
|
2061
|
-
a(this, "reorder", (e) => (s(this, q).subtract(s(this,
|
|
2060
|
+
a(this, "opposite", () => (h(this, q, s(this, q).opposite()), h(this, k, s(this, k).opposite()), this));
|
|
2061
|
+
a(this, "reorder", (e) => (s(this, q).subtract(s(this, k)), s(this, k).zero(), s(this, q).reorder(), e ? this : (s(this, q).monoms.filter((t) => t.degree().isZero()).forEach((t) => {
|
|
2062
2062
|
const i = t.clone();
|
|
2063
|
-
s(this, q).subtract(i), s(this,
|
|
2064
|
-
}), s(this, q).reorder(), s(this,
|
|
2063
|
+
s(this, q).subtract(i), s(this, k).subtract(i);
|
|
2064
|
+
}), s(this, q).reorder(), s(this, k).reorder(), this)));
|
|
2065
2065
|
// ------------------------------------------
|
|
2066
|
-
a(this, "replaceBy", (e, t) => (s(this, q).replaceBy(e, t), s(this,
|
|
2066
|
+
a(this, "replaceBy", (e, t) => (s(this, q).replaceBy(e, t), s(this, k).replaceBy(e, t), this));
|
|
2067
2067
|
/**
|
|
2068
2068
|
* Multiply by the lcm denominator and divide by the gcm numerators.
|
|
2069
2069
|
*/
|
|
2070
|
-
a(this, "simplify", () => (this.multiply(U.lcm(...s(this, q).getDenominators(), ...s(this,
|
|
2070
|
+
a(this, "simplify", () => (this.multiply(U.lcm(...s(this, q).getDenominators(), ...s(this, k).getDenominators())), this.divide(U.gcd(...s(this, q).getNumerators(), ...s(this, k).getNumerators())), this));
|
|
2071
2071
|
// -----------------------------------------------
|
|
2072
2072
|
a(this, "solve", () => new At(this.clone()).solve());
|
|
2073
2073
|
a(this, "test", (e) => this.left.evaluate(e).isEqual(this.right.evaluate(e)));
|
|
@@ -2095,8 +2095,8 @@ const Ne = class Ne {
|
|
|
2095
2095
|
// -----------------------------------------------
|
|
2096
2096
|
// Equations solving algorithms
|
|
2097
2097
|
m(this, et, (e) => e === void 0 ? "=" : e.includes("geq") || e.includes(">=") || e.includes("=>") ? ">=" : e.includes(">") ? ">" : e.includes("leq") || e.includes("<=") || e.includes("=<") ? "<=" : e.includes("<") ? "<" : "=");
|
|
2098
|
-
m(this, Zt, () => s(this,
|
|
2099
|
-
if (h(this, q, new O().zero()), h(this,
|
|
2098
|
+
m(this, Zt, () => s(this, oe) === "=" ? this : s(this, oe).includes("<") ? (s(this, oe).replace("<", ">"), this) : s(this, oe).includes(">") ? (s(this, oe).replace(">", "<"), this) : this);
|
|
2099
|
+
if (h(this, q, new O().zero()), h(this, k, new O().zero()), h(this, oe, "="), e !== void 0 && t === void 0) {
|
|
2100
2100
|
if (e instanceof Ne)
|
|
2101
2101
|
return e.clone();
|
|
2102
2102
|
typeof e == "string" && this.parse(e);
|
|
@@ -2113,11 +2113,11 @@ const Ne = class Ne {
|
|
|
2113
2113
|
*/
|
|
2114
2114
|
add(e) {
|
|
2115
2115
|
if (e instanceof Ne)
|
|
2116
|
-
return s(this, q).add(e.left), s(this,
|
|
2116
|
+
return s(this, q).add(e.left), s(this, k).add(e.right), this;
|
|
2117
2117
|
if (typeof e == "string" && !Ne.isEquationString(e))
|
|
2118
2118
|
return this.add(new Ne(e));
|
|
2119
2119
|
const t = new O(e);
|
|
2120
|
-
return s(this, q).add(t), s(this,
|
|
2120
|
+
return s(this, q).add(t), s(this, k).add(t), this;
|
|
2121
2121
|
}
|
|
2122
2122
|
/**
|
|
2123
2123
|
* Create an Equation using two polynoms.
|
|
@@ -2126,29 +2126,29 @@ const Ne = class Ne {
|
|
|
2126
2126
|
* @param asNumeric
|
|
2127
2127
|
*/
|
|
2128
2128
|
evaluate(e, t) {
|
|
2129
|
-
const i = s(this, q).evaluate(e, t), n = s(this,
|
|
2129
|
+
const i = s(this, q).evaluate(e, t), n = s(this, k).evaluate(e, t);
|
|
2130
2130
|
return t ? i === n : i.isEqual(n);
|
|
2131
2131
|
}
|
|
2132
2132
|
isEqual(e) {
|
|
2133
2133
|
const t = new Ne(e);
|
|
2134
|
-
return t.left.isEqual(s(this, q)) && t.right.isEqual(s(this,
|
|
2134
|
+
return t.left.isEqual(s(this, q)) && t.right.isEqual(s(this, k));
|
|
2135
2135
|
}
|
|
2136
2136
|
pow(e) {
|
|
2137
|
-
return s(this, q).pow(e), s(this,
|
|
2137
|
+
return s(this, q).pow(e), s(this, k).pow(e), this;
|
|
2138
2138
|
}
|
|
2139
2139
|
reduce() {
|
|
2140
2140
|
return this.moveLeft(), s(this, q).reduce(), this.simplify(), s(this, q).monoms[0].coefficient.isNegative() && this.multiply(-1), this;
|
|
2141
2141
|
}
|
|
2142
2142
|
split() {
|
|
2143
|
-
return [s(this, q).clone(), s(this,
|
|
2143
|
+
return [s(this, q).clone(), s(this, k).clone()];
|
|
2144
2144
|
}
|
|
2145
2145
|
subtract(e) {
|
|
2146
2146
|
if (e instanceof Ne)
|
|
2147
|
-
return s(this, q).subtract(e.left), s(this,
|
|
2147
|
+
return s(this, q).subtract(e.left), s(this, k).subtract(e.right), this;
|
|
2148
2148
|
if (typeof e == "string" && !Ne.isEquationString(e))
|
|
2149
2149
|
return this.subtract(new Ne(e));
|
|
2150
2150
|
const t = new O(e);
|
|
2151
|
-
return s(this, q).subtract(t), s(this,
|
|
2151
|
+
return s(this, q).subtract(t), s(this, k).subtract(t), this;
|
|
2152
2152
|
}
|
|
2153
2153
|
static isEquationString(e) {
|
|
2154
2154
|
return e.includes("=") || e.includes("<") || e.includes(">") || e.includes("<=") || e.includes(">=");
|
|
@@ -2158,7 +2158,7 @@ const Ne = class Ne {
|
|
|
2158
2158
|
return t === !0 && n.sort((r, l) => r.value - l.value), n;
|
|
2159
2159
|
}
|
|
2160
2160
|
get display() {
|
|
2161
|
-
return `${s(this, q).display}${this.signAsTex}${s(this,
|
|
2161
|
+
return `${s(this, q).display}${this.signAsTex}${s(this, k).display}`;
|
|
2162
2162
|
}
|
|
2163
2163
|
// Getter and setter
|
|
2164
2164
|
get left() {
|
|
@@ -2171,29 +2171,29 @@ const Ne = class Ne {
|
|
|
2171
2171
|
return this.variables.length;
|
|
2172
2172
|
}
|
|
2173
2173
|
get right() {
|
|
2174
|
-
return s(this,
|
|
2174
|
+
return s(this, k);
|
|
2175
2175
|
}
|
|
2176
2176
|
set right(e) {
|
|
2177
|
-
h(this,
|
|
2177
|
+
h(this, k, e);
|
|
2178
2178
|
}
|
|
2179
2179
|
// ------------------------------------------
|
|
2180
2180
|
get sign() {
|
|
2181
|
-
return s(this,
|
|
2181
|
+
return s(this, oe);
|
|
2182
2182
|
}
|
|
2183
2183
|
set sign(e) {
|
|
2184
|
-
h(this,
|
|
2184
|
+
h(this, oe, s(this, et).call(this, e));
|
|
2185
2185
|
}
|
|
2186
2186
|
get signAsTex() {
|
|
2187
|
-
return s(this,
|
|
2187
|
+
return s(this, oe) === ">=" ? "\\geq" : s(this, oe) === "<=" ? "\\leq" : s(this, oe);
|
|
2188
2188
|
}
|
|
2189
2189
|
get tex() {
|
|
2190
|
-
return `${s(this, q).tex}${this.signAsTex}${s(this,
|
|
2190
|
+
return `${s(this, q).tex}${this.signAsTex}${s(this, k).tex}`;
|
|
2191
2191
|
}
|
|
2192
2192
|
get variables() {
|
|
2193
|
-
return [...new Set(s(this,
|
|
2193
|
+
return [...new Set(s(this, k).variables.concat(s(this, q).variables))];
|
|
2194
2194
|
}
|
|
2195
2195
|
};
|
|
2196
|
-
q = new WeakMap(),
|
|
2196
|
+
q = new WeakMap(), k = new WeakMap(), oe = new WeakMap(), Dt = new WeakMap(), et = new WeakMap(), Zt = new WeakMap();
|
|
2197
2197
|
let H = Ne;
|
|
2198
2198
|
var Te, Ae, be, tt;
|
|
2199
2199
|
const ve = class ve {
|
|
@@ -2336,7 +2336,7 @@ const ve = class ve {
|
|
|
2336
2336
|
}
|
|
2337
2337
|
};
|
|
2338
2338
|
Te = new WeakMap(), Ae = new WeakMap(), be = new WeakMap(), tt = new WeakMap();
|
|
2339
|
-
let
|
|
2339
|
+
let se = ve;
|
|
2340
2340
|
var lt = /* @__PURE__ */ ((o) => (o[o.ROOT = 0] = "ROOT", o[o.POWER = 1] = "POWER", o))(lt || {}), D, $e, Ft, jt;
|
|
2341
2341
|
const Xe = class Xe {
|
|
2342
2342
|
constructor(...e) {
|
|
@@ -2653,7 +2653,7 @@ Oe = new WeakMap(), mt = new WeakSet(), ii = function(e, t) {
|
|
|
2653
2653
|
}
|
|
2654
2654
|
return [...i[0]].sort();
|
|
2655
2655
|
};
|
|
2656
|
-
var it, N, We, ni,
|
|
2656
|
+
var it, N, We, ni, Mi, gt, ri;
|
|
2657
2657
|
const X = class X {
|
|
2658
2658
|
constructor(...e) {
|
|
2659
2659
|
m(this, gt);
|
|
@@ -2663,7 +2663,7 @@ const X = class X {
|
|
|
2663
2663
|
}
|
|
2664
2664
|
parse(...e) {
|
|
2665
2665
|
return h(this, N, []), e.length === 0 ? this : (e.forEach((t) => {
|
|
2666
|
-
t instanceof X ? s(this, N).push(...t.factors.map((i) => i.clone())) : s(this, N).push(new
|
|
2666
|
+
t instanceof X ? s(this, N).push(...t.factors.map((i) => i.clone())) : s(this, N).push(new se(t));
|
|
2667
2667
|
}), this);
|
|
2668
2668
|
}
|
|
2669
2669
|
clone() {
|
|
@@ -2707,7 +2707,7 @@ const X = class X {
|
|
|
2707
2707
|
let t = e[0];
|
|
2708
2708
|
return e.shift(), e.forEach((i) => {
|
|
2709
2709
|
var n;
|
|
2710
|
-
return t = A(n = X, We,
|
|
2710
|
+
return t = A(n = X, We, Mi).call(n, t, i);
|
|
2711
2711
|
}), t;
|
|
2712
2712
|
}
|
|
2713
2713
|
add(...e) {
|
|
@@ -2724,7 +2724,7 @@ const X = class X {
|
|
|
2724
2724
|
).reduce();
|
|
2725
2725
|
return h(this, N, [
|
|
2726
2726
|
...r.factors,
|
|
2727
|
-
new
|
|
2727
|
+
new se(l)
|
|
2728
2728
|
]), n && this.divide(n), h(this, N, s(this, N).filter((c) => !c.power.isZero())), this;
|
|
2729
2729
|
}
|
|
2730
2730
|
get asPower() {
|
|
@@ -2773,7 +2773,7 @@ const X = class X {
|
|
|
2773
2773
|
const c = l.polynom.factorize(e);
|
|
2774
2774
|
if (c.length > 1) {
|
|
2775
2775
|
const f = l.power.clone();
|
|
2776
|
-
t.push(...c.map((d) => new
|
|
2776
|
+
t.push(...c.map((d) => new se(d, f)));
|
|
2777
2777
|
} else
|
|
2778
2778
|
t.push(l.clone());
|
|
2779
2779
|
});
|
|
@@ -2787,13 +2787,13 @@ const X = class X {
|
|
|
2787
2787
|
h(this, N, e);
|
|
2788
2788
|
}
|
|
2789
2789
|
fromPolynom(e, t) {
|
|
2790
|
-
if (h(this, N, [new
|
|
2790
|
+
if (h(this, N, [new se(new O(e))]), t) {
|
|
2791
2791
|
const i = new O(t);
|
|
2792
2792
|
if (i.isOne())
|
|
2793
2793
|
return this;
|
|
2794
2794
|
if (i.isZero())
|
|
2795
2795
|
throw new Error("Cannot divide by zero");
|
|
2796
|
-
s(this, N).push(new
|
|
2796
|
+
s(this, N).push(new se(i, -1));
|
|
2797
2797
|
}
|
|
2798
2798
|
return this;
|
|
2799
2799
|
}
|
|
@@ -2830,11 +2830,11 @@ const X = class X {
|
|
|
2830
2830
|
return new X(...s(this, N).filter((e) => e.power.isPositive()));
|
|
2831
2831
|
}
|
|
2832
2832
|
one() {
|
|
2833
|
-
return h(this, N, [new
|
|
2833
|
+
return h(this, N, [new se("1", "1")]), this;
|
|
2834
2834
|
}
|
|
2835
2835
|
opposite() {
|
|
2836
2836
|
const e = s(this, N).findIndex((t) => t.display === "(-1)");
|
|
2837
|
-
return e >= 0 ? s(this, N).splice(e, 1) : s(this, N).push(new
|
|
2837
|
+
return e >= 0 ? s(this, N).splice(e, 1) : s(this, N).push(new se("-1", "1")), this;
|
|
2838
2838
|
}
|
|
2839
2839
|
pow(e) {
|
|
2840
2840
|
return h(this, N, s(this, N).map((t) => t.pow(e))), this;
|
|
@@ -2846,7 +2846,7 @@ const X = class X {
|
|
|
2846
2846
|
const e = ht(this);
|
|
2847
2847
|
return h(this, N, Object.values(e).map((t) => {
|
|
2848
2848
|
const i = t[0].polynom, n = t.reduce((r, l) => r.add(l.power), new u("0"));
|
|
2849
|
-
return new
|
|
2849
|
+
return new se(i, n.reduce());
|
|
2850
2850
|
}).filter((t) => !t.power.isZero())), this;
|
|
2851
2851
|
}
|
|
2852
2852
|
root(e) {
|
|
@@ -2877,7 +2877,7 @@ const X = class X {
|
|
|
2877
2877
|
return this.add(...e.map((t) => t.opposite()));
|
|
2878
2878
|
}
|
|
2879
2879
|
tableOfSigns() {
|
|
2880
|
-
const e = this.getZeroes(), t = e.map((r) => r.value), i = this.factors.map((r) => ({ factor: new
|
|
2880
|
+
const e = this.getZeroes(), t = e.map((r) => r.value), i = this.factors.map((r) => ({ factor: new se(r), ...r.tableOfSigns() }));
|
|
2881
2881
|
return i.forEach((r) => {
|
|
2882
2882
|
const l = new Array(2 * e.length + 1).fill("");
|
|
2883
2883
|
let c = r.signs.shift(), f = r.roots.shift();
|
|
@@ -2911,34 +2911,34 @@ const X = class X {
|
|
|
2911
2911
|
return s(this, N).reduce((e, t) => e.concat(t.variables), []);
|
|
2912
2912
|
}
|
|
2913
2913
|
zero() {
|
|
2914
|
-
return h(this, N, [new
|
|
2914
|
+
return h(this, N, [new se("0", "1")]), this;
|
|
2915
2915
|
}
|
|
2916
2916
|
};
|
|
2917
2917
|
it = new WeakMap(), N = new WeakMap(), We = new WeakSet(), ni = function(e, t) {
|
|
2918
2918
|
const i = ht(e), n = ht(t), l = Object.keys(i).filter((c) => Object.hasOwn(n, c)).map((c) => {
|
|
2919
2919
|
const f = i[c].reduce((p, w) => p.add(w.power), new u("0")), d = n[c].reduce((p, w) => p.add(w.power), new u("0"));
|
|
2920
|
-
return new
|
|
2920
|
+
return new se(c, u.min(f, d));
|
|
2921
2921
|
});
|
|
2922
2922
|
return new X(...l);
|
|
2923
|
-
},
|
|
2923
|
+
}, Mi = function(e, t) {
|
|
2924
2924
|
const i = ht(e), n = ht(t), l = [.../* @__PURE__ */ new Set([...Object.keys(i), ...Object.keys(n)])].map((c) => {
|
|
2925
2925
|
const f = Object.hasOwn(i, c) ? i[c].reduce((p, w) => p.add(w.power), new u("0")) : new u(0), d = Object.hasOwn(n, c) ? n[c].reduce((p, w) => p.add(w.power), new u("0")) : new u(0);
|
|
2926
|
-
return new
|
|
2926
|
+
return new se(c, u.max(f, d));
|
|
2927
2927
|
});
|
|
2928
2928
|
return new X(...l);
|
|
2929
2929
|
}, gt = new WeakSet(), ri = function() {
|
|
2930
2930
|
let e, t = [];
|
|
2931
|
-
return s(this, it) === lt.ROOT ? (e = this.numerator.factors, t = this.denominator.factors) : e = s(this, N), e.length === 0 && (e = [new
|
|
2931
|
+
return s(this, it) === lt.ROOT ? (e = this.numerator.factors, t = this.denominator.factors) : e = s(this, N), e.length === 0 && (e = [new se("1")]), { num: e, den: t };
|
|
2932
2932
|
}, m(X, We);
|
|
2933
2933
|
let si = X;
|
|
2934
2934
|
function ht(o) {
|
|
2935
|
-
const e = new u().one(), t = o.factors.reduce((
|
|
2936
|
-
if (
|
|
2937
|
-
return
|
|
2938
|
-
const
|
|
2939
|
-
return Object.hasOwn(
|
|
2940
|
-
}, {});
|
|
2941
|
-
return
|
|
2935
|
+
const e = new u().one(), t = new u().one(), i = o.factors.reduce((l, c) => {
|
|
2936
|
+
if (c.polynom.degree().isZero())
|
|
2937
|
+
return c.power.isPositive() ? e.multiply(c.polynom.monoms[0].coefficient) : t.multiply(c.polynom.monoms[0].coefficient), l;
|
|
2938
|
+
const f = c.polynom.display;
|
|
2939
|
+
return Object.hasOwn(l, f) ? l[f].push(c) : l[f] = [c], l;
|
|
2940
|
+
}, {}), { numerator: n, denominator: r } = e.divide(t).reduce();
|
|
2941
|
+
return n !== 1 && (i[n.toString()] = [new se(n, 1)]), r !== 1 && (i[r.toString()] = [new se(r, -1)]), i;
|
|
2942
2942
|
}
|
|
2943
2943
|
function ns(o, e) {
|
|
2944
2944
|
return o.dimension === e.dimension && o.array.every(
|
|
@@ -2973,7 +2973,7 @@ function hs(...o) {
|
|
|
2973
2973
|
).add(o[0].array[2].clone().multiply(o[1].array[0].clone().multiply(o[2].array[1]).subtract(o[1].array[1].clone().multiply(o[2].array[0]))));
|
|
2974
2974
|
}
|
|
2975
2975
|
var F, Le;
|
|
2976
|
-
const
|
|
2976
|
+
const Be = class Be {
|
|
2977
2977
|
constructor(...e) {
|
|
2978
2978
|
m(this, F, []);
|
|
2979
2979
|
m(this, Le, !1);
|
|
@@ -3100,7 +3100,7 @@ const Se = class Se {
|
|
|
3100
3100
|
if (e.length === 0)
|
|
3101
3101
|
throw new Error("Invalid value");
|
|
3102
3102
|
if (e.length === 1) {
|
|
3103
|
-
if (e[0] instanceof
|
|
3103
|
+
if (e[0] instanceof Be)
|
|
3104
3104
|
return e[0].clone();
|
|
3105
3105
|
if (typeof e[0] == "string")
|
|
3106
3106
|
return this.fromString(e[0]);
|
|
@@ -3108,7 +3108,7 @@ const Se = class Se {
|
|
|
3108
3108
|
}
|
|
3109
3109
|
if (e.length === 2) {
|
|
3110
3110
|
const [t, i] = e;
|
|
3111
|
-
if (t instanceof
|
|
3111
|
+
if (t instanceof Be && i instanceof Be) {
|
|
3112
3112
|
if (t.dimension !== i.dimension)
|
|
3113
3113
|
throw new Error("Vectors must have the same dimension");
|
|
3114
3114
|
return h(this, F, i.array.map((n, r) => n.clone().subtract(t.array[r]))), this;
|
|
@@ -3117,7 +3117,7 @@ const Se = class Se {
|
|
|
3117
3117
|
return h(this, F, e.map((t) => new u(t))), this;
|
|
3118
3118
|
}
|
|
3119
3119
|
clone() {
|
|
3120
|
-
const e = new
|
|
3120
|
+
const e = new Be();
|
|
3121
3121
|
return e.array = this.copy(), e.asPoint = this.asPoint, e;
|
|
3122
3122
|
}
|
|
3123
3123
|
copy() {
|
|
@@ -3136,7 +3136,7 @@ const Se = class Se {
|
|
|
3136
3136
|
cross(e) {
|
|
3137
3137
|
if (this.dimension !== 3 || e.dimension !== 3)
|
|
3138
3138
|
throw new Error("Cross product can only be determined in 3D");
|
|
3139
|
-
return new
|
|
3139
|
+
return new Be(
|
|
3140
3140
|
this.y.clone().multiply(e.z).subtract(this.z.clone().multiply(e.y)),
|
|
3141
3141
|
this.z.clone().multiply(e.x).subtract(this.x.clone().multiply(e.z)),
|
|
3142
3142
|
this.x.clone().multiply(e.y).subtract(this.y.clone().multiply(e.x))
|
|
@@ -3149,7 +3149,7 @@ const Se = class Se {
|
|
|
3149
3149
|
return this.array.every((e, t) => t === 0 ? e.isOne() : e.isZero());
|
|
3150
3150
|
}
|
|
3151
3151
|
distanceTo(e) {
|
|
3152
|
-
const t = new
|
|
3152
|
+
const t = new Be(this, e);
|
|
3153
3153
|
return {
|
|
3154
3154
|
value: t.norm,
|
|
3155
3155
|
fraction: t.normSquare,
|
|
@@ -3158,7 +3158,7 @@ const Se = class Se {
|
|
|
3158
3158
|
}
|
|
3159
3159
|
};
|
|
3160
3160
|
F = new WeakMap(), Le = new WeakMap();
|
|
3161
|
-
let E =
|
|
3161
|
+
let E = Be;
|
|
3162
3162
|
var we = /* @__PURE__ */ ((o) => (o.None = "none", o.Parallel = "parallel", o.Perpendicular = "perpendicular", o.Tangent = "tangent", o))(we || {}), oi = /* @__PURE__ */ ((o) => (o.None = "none", o.Parallel = "parallel", o.Perpendicular = "perpendicular", o.Tangent = "tangent", o))(oi || {});
|
|
3163
3163
|
function Ci(o = 0.5) {
|
|
3164
3164
|
return Math.random() < o;
|
|
@@ -3198,7 +3198,7 @@ function $i(o) {
|
|
|
3198
3198
|
}
|
|
3199
3199
|
return e;
|
|
3200
3200
|
}
|
|
3201
|
-
class
|
|
3201
|
+
class S extends E {
|
|
3202
3202
|
constructor(...e) {
|
|
3203
3203
|
super(), e.length > 0 && this.parse(...e);
|
|
3204
3204
|
}
|
|
@@ -3220,11 +3220,11 @@ class B extends E {
|
|
|
3220
3220
|
return this;
|
|
3221
3221
|
}
|
|
3222
3222
|
clone() {
|
|
3223
|
-
const e = new
|
|
3223
|
+
const e = new S();
|
|
3224
3224
|
return e.array = this.copy(), e.asPoint = !0, e;
|
|
3225
3225
|
}
|
|
3226
3226
|
}
|
|
3227
|
-
var Pe,
|
|
3227
|
+
var Pe, B, z, W, he, J, Ie, xe;
|
|
3228
3228
|
const De = class De {
|
|
3229
3229
|
/**
|
|
3230
3230
|
* Value can be a mix of:
|
|
@@ -3234,15 +3234,15 @@ const De = class De {
|
|
|
3234
3234
|
constructor(...e) {
|
|
3235
3235
|
m(this, Pe);
|
|
3236
3236
|
// ax + by + c = 0
|
|
3237
|
-
m(this,
|
|
3237
|
+
m(this, B);
|
|
3238
3238
|
m(this, z);
|
|
3239
3239
|
m(this, W);
|
|
3240
|
-
m(this,
|
|
3240
|
+
m(this, he);
|
|
3241
3241
|
m(this, J);
|
|
3242
3242
|
m(this, Ie);
|
|
3243
3243
|
m(this, xe, "canonical");
|
|
3244
3244
|
a(this, "randomPoint", (e) => {
|
|
3245
|
-
const t = s(this, J).clone().multiplyByScalar(Q(e === void 0 || e <= 1 ? 3 : e, !1)).add(s(this,
|
|
3245
|
+
const t = s(this, J).clone().multiplyByScalar(Q(e === void 0 || e <= 1 ? 3 : e, !1)).add(s(this, he));
|
|
3246
3246
|
return t.asPoint = !0, t;
|
|
3247
3247
|
});
|
|
3248
3248
|
a(this, "randomNearPoint", (e) => {
|
|
@@ -3311,23 +3311,23 @@ const De = class De {
|
|
|
3311
3311
|
e.left.monomByDegree(0).coefficient
|
|
3312
3312
|
);
|
|
3313
3313
|
});
|
|
3314
|
-
a(this, "fromCoefficient", (e, t, i) => (h(this,
|
|
3314
|
+
a(this, "fromCoefficient", (e, t, i) => (h(this, B, new u(e)), h(this, z, new u(t)), h(this, W, new u(i)), h(this, J, new E(s(this, z).clone(), s(this, B).clone().opposite())), h(this, he, new E(new u().zero(), s(this, W).clone())), h(this, Ie, s(this, J).clone().normal()), this));
|
|
3315
3315
|
a(this, "fromPointAndDirection", (e, t) => (this.fromCoefficient(
|
|
3316
3316
|
t.y,
|
|
3317
3317
|
t.x.clone().opposite(),
|
|
3318
3318
|
e.x.clone().multiply(t.y).subtract(e.y.clone().multiply(t.x)).opposite()
|
|
3319
|
-
), h(this,
|
|
3319
|
+
), h(this, he, e.clone()), h(this, J, t.clone()), h(this, Ie, s(this, J).clone().normal()), this));
|
|
3320
3320
|
a(this, "fromPointAndNormal", (e, t) => this.fromCoefficient(
|
|
3321
3321
|
t.x,
|
|
3322
3322
|
t.y,
|
|
3323
3323
|
e.x.clone().multiply(t.x).add(e.y.clone().multiply(t.y)).opposite()
|
|
3324
3324
|
));
|
|
3325
3325
|
a(this, "fromPointAndLine", (e, t, i) => (i === void 0 && (i = we.Parallel), i === we.Parallel ? this.fromPointAndNormal(e, t.normal) : i === we.Perpendicular ? this.fromPointAndNormal(e, t.director) : this));
|
|
3326
|
-
a(this, "clone", () => (h(this,
|
|
3326
|
+
a(this, "clone", () => (h(this, B, s(this, B).clone()), h(this, z, s(this, z).clone()), h(this, W, s(this, W).clone()), h(this, J, s(this, J).clone()), h(this, he, s(this, he).clone()), h(this, Ie, s(this, Ie).clone()), this));
|
|
3327
3327
|
// ------------------------------------------
|
|
3328
3328
|
// Mathematical operations
|
|
3329
3329
|
// ------------------------------------------
|
|
3330
|
-
a(this, "isOnLine", (e) => s(this,
|
|
3330
|
+
a(this, "isOnLine", (e) => s(this, B).clone().multiply(e.x).add(
|
|
3331
3331
|
s(this, z).clone().multiply(e.y)
|
|
3332
3332
|
).add(s(this, W)).isZero());
|
|
3333
3333
|
a(this, "isParallelTo", (e) => this.slope.isEqual(e.slope) && this.height.isNotEqual(e.height));
|
|
@@ -3335,18 +3335,18 @@ const De = class De {
|
|
|
3335
3335
|
a(this, "isPerpendicularTo", (e) => this.d.isNormalTo(e.d));
|
|
3336
3336
|
a(this, "isVertical", () => this.slope.isInfinity());
|
|
3337
3337
|
a(this, "simplify", () => {
|
|
3338
|
-
const e = U.lcm(s(this,
|
|
3338
|
+
const e = U.lcm(s(this, B).denominator, s(this, z).denominator, s(this, W).denominator), t = U.gcd(s(this, B).numerator, s(this, z).numerator, s(this, W).numerator);
|
|
3339
3339
|
return this.fromCoefficient(
|
|
3340
|
-
s(this,
|
|
3340
|
+
s(this, B).clone().multiply(e).divide(t),
|
|
3341
3341
|
s(this, z).clone().multiply(e).divide(t),
|
|
3342
3342
|
s(this, W).clone().multiply(e).divide(t)
|
|
3343
3343
|
), this;
|
|
3344
3344
|
});
|
|
3345
3345
|
a(this, "simplifyDirection", () => (s(this, J).simplify(), this));
|
|
3346
3346
|
a(this, "intersection", (e) => {
|
|
3347
|
-
const t = new
|
|
3347
|
+
const t = new S();
|
|
3348
3348
|
let i = !1, n = !1;
|
|
3349
|
-
return s(this, z).isZero() || e.b.isZero(), this.isParallelTo(e) ? (t.x = new u().invalid(), t.y = new u().invalid(), i = !0) : this.isSameAs(e) ? (t.x = new u().invalid(), t.y = new u().invalid(), n = !0) : (t.x = s(this, z).clone().multiply(e.c).subtract(s(this, W).clone().multiply(e.b)).divide(s(this,
|
|
3349
|
+
return s(this, z).isZero() || e.b.isZero(), this.isParallelTo(e) ? (t.x = new u().invalid(), t.y = new u().invalid(), i = !0) : this.isSameAs(e) ? (t.x = new u().invalid(), t.y = new u().invalid(), n = !0) : (t.x = s(this, z).clone().multiply(e.c).subtract(s(this, W).clone().multiply(e.b)).divide(s(this, B).clone().multiply(e.b).subtract(s(this, z).clone().multiply(e.a))), t.y = s(this, B).clone().multiply(e.c).subtract(s(this, W).clone().multiply(e.a)).divide(s(this, z).clone().multiply(e.a).subtract(s(this, B).clone().multiply(e.b)))), {
|
|
3350
3350
|
point: t,
|
|
3351
3351
|
hasIntersection: !(i || n),
|
|
3352
3352
|
isParallel: i,
|
|
@@ -3361,15 +3361,15 @@ const De = class De {
|
|
|
3361
3361
|
const t = this.getEquation().isolate("x"), i = new u(e);
|
|
3362
3362
|
return t instanceof H ? t.right.evaluate({ y: i }) : new u().invalid();
|
|
3363
3363
|
});
|
|
3364
|
-
return h(this,
|
|
3364
|
+
return h(this, B, new u().zero()), h(this, z, new u().zero()), h(this, W, new u().zero()), h(this, he, new E()), h(this, J, new E()), h(this, Ie, new E()), h(this, Pe, !0), e.length > 0 && this.parse(...e), this;
|
|
3365
3365
|
}
|
|
3366
3366
|
get a() {
|
|
3367
|
-
return s(this,
|
|
3367
|
+
return s(this, B);
|
|
3368
3368
|
}
|
|
3369
3369
|
// ------------------------------------------
|
|
3370
3370
|
// Getter and setter
|
|
3371
3371
|
set a(e) {
|
|
3372
|
-
h(this,
|
|
3372
|
+
h(this, B, e);
|
|
3373
3373
|
}
|
|
3374
3374
|
get b() {
|
|
3375
3375
|
return s(this, z);
|
|
@@ -3384,10 +3384,10 @@ const De = class De {
|
|
|
3384
3384
|
h(this, W, e);
|
|
3385
3385
|
}
|
|
3386
3386
|
get OA() {
|
|
3387
|
-
return s(this,
|
|
3387
|
+
return s(this, he);
|
|
3388
3388
|
}
|
|
3389
3389
|
set OA(e) {
|
|
3390
|
-
h(this,
|
|
3390
|
+
h(this, he, e);
|
|
3391
3391
|
}
|
|
3392
3392
|
get d() {
|
|
3393
3393
|
return s(this, J);
|
|
@@ -3400,7 +3400,7 @@ const De = class De {
|
|
|
3400
3400
|
}
|
|
3401
3401
|
// ------------------------------------------
|
|
3402
3402
|
getEquation() {
|
|
3403
|
-
const e = new H(new O().parse("xy", s(this,
|
|
3403
|
+
const e = new H(new O().parse("xy", s(this, B), s(this, z), s(this, W)), new O("0"));
|
|
3404
3404
|
return s(this, Pe) ? e.simplify() : e;
|
|
3405
3405
|
}
|
|
3406
3406
|
// get system(): { x: Equation, y: Equation } {
|
|
@@ -3441,14 +3441,14 @@ const De = class De {
|
|
|
3441
3441
|
case "parametric":
|
|
3442
3442
|
case "system": {
|
|
3443
3443
|
const t = s(this, J).clone();
|
|
3444
|
-
return s(this, Pe) && t.simplify(), e === "parametric" ? `${E.asTex("x", "y")} = ${E.asTex(s(this,
|
|
3445
|
-
x &= ${new O(s(this,
|
|
3446
|
-
y &= ${new O(s(this,
|
|
3444
|
+
return s(this, Pe) && t.simplify(), e === "parametric" ? `${E.asTex("x", "y")} = ${E.asTex(s(this, he).x.tex, s(this, he).y.tex)} + k\\cdot ${E.asTex(t.x.tex, t.y.tex)}` : `\\left\\{\\begin{aligned}
|
|
3445
|
+
x &= ${new O(s(this, he).x).add(new M(s(this, J).x).multiply(new M("k"))).reorder("k", !0).tex}\\\\
|
|
3446
|
+
y &= ${new O(s(this, he).y).add(new M(s(this, J).y).multiply(new M("k"))).reorder("k", !0).tex}
|
|
3447
3447
|
\\end{aligned}\\right.`;
|
|
3448
3448
|
}
|
|
3449
3449
|
default: {
|
|
3450
3450
|
const t = this.getEquation();
|
|
3451
|
-
return s(this,
|
|
3451
|
+
return s(this, B).isNegative() && t.multiply(-1), t.tex;
|
|
3452
3452
|
}
|
|
3453
3453
|
}
|
|
3454
3454
|
}
|
|
@@ -3467,22 +3467,22 @@ const De = class De {
|
|
|
3467
3467
|
return this.slope.isInfinity() ? "x=" + this.OA.x.display : "y=" + new O().parse("x", this.slope, this.height).display;
|
|
3468
3468
|
case "parametric": {
|
|
3469
3469
|
const t = s(this, J).clone();
|
|
3470
|
-
return s(this, Pe) && t.simplify(), `((x,y))=((${s(this,
|
|
3470
|
+
return s(this, Pe) && t.simplify(), `((x,y))=((${s(this, he).x.display},${s(this, he).y.display}))+k((${t.x.display},${t.y.display}))`;
|
|
3471
3471
|
}
|
|
3472
3472
|
default: {
|
|
3473
3473
|
const t = this.getEquation();
|
|
3474
|
-
return s(this,
|
|
3474
|
+
return s(this, B).isNegative() && t.multiply(-1), t.display;
|
|
3475
3475
|
}
|
|
3476
3476
|
}
|
|
3477
3477
|
}
|
|
3478
3478
|
get normal() {
|
|
3479
|
-
return new E(s(this,
|
|
3479
|
+
return new E(s(this, B), s(this, z));
|
|
3480
3480
|
}
|
|
3481
3481
|
get director() {
|
|
3482
3482
|
return s(this, J).clone();
|
|
3483
3483
|
}
|
|
3484
3484
|
get slope() {
|
|
3485
|
-
return s(this,
|
|
3485
|
+
return s(this, B).clone().opposite().divide(s(this, z));
|
|
3486
3486
|
}
|
|
3487
3487
|
get height() {
|
|
3488
3488
|
return s(this, W).clone().opposite().divide(s(this, z));
|
|
@@ -3491,7 +3491,7 @@ const De = class De {
|
|
|
3491
3491
|
return this.fromPointAndDirection(e, new E(e, t));
|
|
3492
3492
|
}
|
|
3493
3493
|
distanceTo(e) {
|
|
3494
|
-
const t = e.x.clone().multiply(s(this,
|
|
3494
|
+
const t = e.x.clone().multiply(s(this, B)).add(e.y.clone().multiply(s(this, z))).add(s(this, W)).abs(), i = this.normal.normSquare;
|
|
3495
3495
|
if (i.isZero())
|
|
3496
3496
|
return {
|
|
3497
3497
|
value: NaN,
|
|
@@ -3521,17 +3521,17 @@ const De = class De {
|
|
|
3521
3521
|
canonicalAsFloatCoefficient(e) {
|
|
3522
3522
|
e === void 0 && (e = 2);
|
|
3523
3523
|
let t = "";
|
|
3524
|
-
return s(this,
|
|
3524
|
+
return s(this, B).isZero() || (s(this, B).isOne() ? t = "x" : s(this, B).clone().opposite().isOne() ? t = "-x" : t = s(this, B).value.toFixed(e) + "x"), s(this, z).isZero() || (s(this, z).isPositive() && (t += "+"), t += s(this, z).value.toFixed(e) + "y"), s(this, W).isZero() || (s(this, W).isPositive() && (t += "+"), t += s(this, W).value.toFixed(e)), t + "=0";
|
|
3525
3525
|
}
|
|
3526
3526
|
};
|
|
3527
|
-
Pe = new WeakMap(),
|
|
3527
|
+
Pe = new WeakMap(), B = new WeakMap(), z = new WeakMap(), W = new WeakMap(), he = new WeakMap(), J = new WeakMap(), Ie = new WeakMap(), xe = new WeakMap(), // A line is defined as the canonical form
|
|
3528
3528
|
a(De, "PERPENDICULAR", we.Perpendicular), a(De, "PARALLEL", we.Parallel);
|
|
3529
3529
|
let R = De;
|
|
3530
|
-
var
|
|
3530
|
+
var ae, j, qe, Ut, Wt, Gt, le, Pi, Nt, Ii, Si, Bi, hi;
|
|
3531
3531
|
const Ht = class Ht {
|
|
3532
3532
|
constructor(...e) {
|
|
3533
3533
|
m(this, le);
|
|
3534
|
-
m(this,
|
|
3534
|
+
m(this, ae);
|
|
3535
3535
|
m(this, j);
|
|
3536
3536
|
m(this, qe);
|
|
3537
3537
|
/**
|
|
@@ -3540,9 +3540,9 @@ const Ht = class Ht {
|
|
|
3540
3540
|
* @returns {number}
|
|
3541
3541
|
*/
|
|
3542
3542
|
a(this, "relativePosition", (e) => {
|
|
3543
|
-
if (s(this,
|
|
3543
|
+
if (s(this, ae) === void 0 || s(this, j) === void 0)
|
|
3544
3544
|
throw new Error("Circle not defined");
|
|
3545
|
-
const t = e.distanceTo(s(this,
|
|
3545
|
+
const t = e.distanceTo(s(this, ae)), i = Math.sqrt(s(this, j).value);
|
|
3546
3546
|
return t.value - i > 1e-10 ? 0 : Math.abs(t.value - i) < 1e-10 ? 1 : 2;
|
|
3547
3547
|
});
|
|
3548
3548
|
a(this, "lineIntersection", (e) => {
|
|
@@ -3552,7 +3552,7 @@ const Ht = class Ht {
|
|
|
3552
3552
|
const i = s(this, qe).clone(), n = e.getEquation().clone().isolate("x"), r = e.getEquation().clone().isolate("y");
|
|
3553
3553
|
return n instanceof H && r instanceof H && (i.replaceBy("y", r.right).simplify(), i.solve()), t;
|
|
3554
3554
|
});
|
|
3555
|
-
a(this, "tangents", (e) => e instanceof u ? s(this, Gt).call(this, e) : this.isPointOnCircle(e) ? s(this, Ut).call(this, e) : s(this,
|
|
3555
|
+
a(this, "tangents", (e) => e instanceof u ? s(this, Gt).call(this, e) : this.isPointOnCircle(e) ? s(this, Ut).call(this, e) : s(this, ae) !== void 0 && s(this, ae).distanceTo(e).value > this.radius.value ? s(this, Wt).call(this, e) : (console.log("No tangents as the point is inside !"), []));
|
|
3556
3556
|
a(this, "isPointOnCircle", (e) => {
|
|
3557
3557
|
var t;
|
|
3558
3558
|
return ((t = s(this, qe)) == null ? void 0 : t.test({ x: e.x, y: e.y })) ?? !1;
|
|
@@ -3562,7 +3562,7 @@ const Ht = class Ht {
|
|
|
3562
3562
|
return t.forEach((n) => {
|
|
3563
3563
|
for (const r of [[1, 1], [-1, 1], [-1, -1], [1, -1]])
|
|
3564
3564
|
i.push(
|
|
3565
|
-
new
|
|
3565
|
+
new S(
|
|
3566
3566
|
this.center.x.clone().add(r[0] * n[0]),
|
|
3567
3567
|
this.center.y.clone().add(r[1] * n[1])
|
|
3568
3568
|
)
|
|
@@ -3588,7 +3588,7 @@ const Ht = class Ht {
|
|
|
3588
3588
|
e.length > 0 && this.parse(...e);
|
|
3589
3589
|
}
|
|
3590
3590
|
get center() {
|
|
3591
|
-
return s(this,
|
|
3591
|
+
return s(this, ae) ?? new S();
|
|
3592
3592
|
}
|
|
3593
3593
|
get squareRadius() {
|
|
3594
3594
|
return s(this, j) ?? new u(0);
|
|
@@ -3631,7 +3631,7 @@ const Ht = class Ht {
|
|
|
3631
3631
|
return t ? h(this, j, new u(e)) : h(this, j, new u(e).pow(2)), A(this, le, Nt).call(this), this;
|
|
3632
3632
|
}
|
|
3633
3633
|
parse(...e) {
|
|
3634
|
-
return A(this, le, Pi).call(this), typeof e[0] == "string" ? A(this, le, hi).call(this, new H(e[0])) : e[0] instanceof H ? A(this, le, hi).call(this, e[0]) : e[0] instanceof Ht ? A(this, le, Ii).call(this, e[0]) : e[0] instanceof
|
|
3634
|
+
return A(this, le, Pi).call(this), typeof e[0] == "string" ? A(this, le, hi).call(this, new H(e[0])) : e[0] instanceof H ? A(this, le, hi).call(this, e[0]) : e[0] instanceof Ht ? A(this, le, Ii).call(this, e[0]) : e[0] instanceof S && e.length > 1 && (e[1] instanceof S ? e[2] instanceof S || A(this, le, Bi).call(this, e[0], e[1]) : (e[1] instanceof u || typeof e[1] == "number") && A(this, le, Si).call(this, e[0], e[1], typeof e[2] == "boolean" ? e[2] : !1)), A(this, le, Nt).call(this), this;
|
|
3635
3635
|
}
|
|
3636
3636
|
// private _parseThroughtThreePoints(A: Point, B: Point, C: Point): this {
|
|
3637
3637
|
// const T = new Triangle(A, B, C), mAB = T.remarquables.mediators.AB.clone(),
|
|
@@ -3640,24 +3640,24 @@ const Ht = class Ht {
|
|
|
3640
3640
|
// return this
|
|
3641
3641
|
// }
|
|
3642
3642
|
};
|
|
3643
|
-
|
|
3644
|
-
return h(this,
|
|
3643
|
+
ae = new WeakMap(), j = new WeakMap(), qe = new WeakMap(), Ut = new WeakMap(), Wt = new WeakMap(), Gt = new WeakMap(), le = new WeakSet(), Pi = function() {
|
|
3644
|
+
return h(this, ae, void 0), h(this, j, void 0), h(this, qe, void 0), this;
|
|
3645
3645
|
}, Nt = function() {
|
|
3646
3646
|
h(this, qe, new H(
|
|
3647
3647
|
new O(`(x-(${this.center.x.display}))^2+(y-(${this.center.y.display}))^2`),
|
|
3648
3648
|
new O(this.squareRadius.display)
|
|
3649
3649
|
).moveLeft());
|
|
3650
3650
|
}, Ii = function(e) {
|
|
3651
|
-
return h(this,
|
|
3652
|
-
},
|
|
3653
|
-
return h(this,
|
|
3654
|
-
},
|
|
3655
|
-
return h(this,
|
|
3651
|
+
return h(this, ae, e.center.clone()), h(this, j, e.squareRadius.clone()), A(this, le, Nt).call(this), this;
|
|
3652
|
+
}, Si = function(e, t, i) {
|
|
3653
|
+
return h(this, ae, e.clone()), i ? h(this, j, new u(t)) : h(this, j, new u(t).pow(2)), this;
|
|
3654
|
+
}, Bi = function(e, t) {
|
|
3655
|
+
return h(this, ae, e.clone()), h(this, j, new E(s(this, ae), t).normSquare), this;
|
|
3656
3656
|
}, hi = function(e) {
|
|
3657
3657
|
if (e.moveLeft(), e.degree("x").value === 2 && e.degree("y").value === 2) {
|
|
3658
3658
|
const t = e.left.monomByDegree(2, "x"), i = e.left.monomByDegree(2, "y");
|
|
3659
3659
|
let n, r, l;
|
|
3660
|
-
t.coefficient.isEqual(i.coefficient) ? (e.divide(t.coefficient), n = e.left.monomByDegree(1, "x"), r = e.left.monomByDegree(1, "y"), l = e.left.monomByDegree(0), h(this,
|
|
3660
|
+
t.coefficient.isEqual(i.coefficient) ? (e.divide(t.coefficient), n = e.left.monomByDegree(1, "x"), r = e.left.monomByDegree(1, "y"), l = e.left.monomByDegree(0), h(this, ae, new S(n.coefficient.clone().divide(2).opposite(), r.coefficient.clone().divide(2).opposite())), h(this, j, l.coefficient.clone().opposite().add(s(this, ae).x.clone().pow(2)).add(s(this, ae).y.clone().pow(2)))) : (h(this, ae, void 0), h(this, j, void 0));
|
|
3661
3661
|
}
|
|
3662
3662
|
return this;
|
|
3663
3663
|
};
|
|
@@ -3666,7 +3666,7 @@ var L, G;
|
|
|
3666
3666
|
const ct = class ct {
|
|
3667
3667
|
constructor(e, t) {
|
|
3668
3668
|
// ax + by + c = 0
|
|
3669
|
-
m(this, L, new
|
|
3669
|
+
m(this, L, new S());
|
|
3670
3670
|
m(this, G, new E());
|
|
3671
3671
|
a(this, "clone", () => (h(this, G, s(this, G).clone()), h(this, L, s(this, L).clone()), this));
|
|
3672
3672
|
// ------------------------------------------
|
|
@@ -3709,7 +3709,7 @@ const ct = class ct {
|
|
|
3709
3709
|
// }
|
|
3710
3710
|
a(this, "randomPoint", (e = 5) => {
|
|
3711
3711
|
const t = s(this, L).clone(), i = new u(Q(e, !1));
|
|
3712
|
-
return new
|
|
3712
|
+
return new S(
|
|
3713
3713
|
t.x.clone().add(s(this, G).x.clone().multiply(i)),
|
|
3714
3714
|
t.y.clone().add(s(this, G).y.clone().multiply(i)),
|
|
3715
3715
|
t.z.clone().add(s(this, G).z.clone().multiply(i))
|
|
@@ -3736,9 +3736,9 @@ const ct = class ct {
|
|
|
3736
3736
|
return {
|
|
3737
3737
|
parametric: `${E.asTex("x", "y", "z")} = ${E.asTex(s(this, L).x.tex, s(this, L).y.tex, s(this, L).z.tex)} + k\\cdot ${E.asTex(s(this, G).x.tex, s(this, G).y.tex, s(this, G).z.tex)}`,
|
|
3738
3738
|
system: `\\left\\{\\begin{aligned}
|
|
3739
|
-
x &= ${new O(s(this, L).x).add(new
|
|
3740
|
-
y &= ${new O(s(this, L).y).add(new
|
|
3741
|
-
z &= ${new O(s(this, L).z).add(new
|
|
3739
|
+
x &= ${new O(s(this, L).x).add(new M(s(this, G).x).multiply(new M("k"))).reorder("k", !0).tex}\\\\
|
|
3740
|
+
y &= ${new O(s(this, L).y).add(new M(s(this, G).y).multiply(new M("k"))).reorder("k", !0).tex}\\\\
|
|
3741
|
+
z &= ${new O(s(this, L).z).add(new M(s(this, G).z).multiply(new M("k"))).reorder("k", !0).tex}
|
|
3742
3742
|
\\end{aligned}\\right.`,
|
|
3743
3743
|
cartesian: `\\frac{ ${new O("x", 1, s(this, L).x.clone().opposite()).tex} }{ ${this.direction.x.tex} } = \\frac{ ${new O("y", 1, s(this, L).y.clone().opposite()).tex} }{ ${this.direction.y.tex} } = \\frac{ ${new O("z", 1, s(this, L).z.clone().opposite()).tex} }{ ${this.direction.z.tex} }`
|
|
3744
3744
|
};
|
|
@@ -3772,23 +3772,23 @@ const ct = class ct {
|
|
|
3772
3772
|
L = new WeakMap(), G = new WeakMap(), // A line is defined as the canonical form
|
|
3773
3773
|
a(ct, "PERPENDICULAR", oi.Perpendicular), a(ct, "PARALLEL", oi.Parallel);
|
|
3774
3774
|
let Ot = ct;
|
|
3775
|
-
var
|
|
3775
|
+
var ke;
|
|
3776
3776
|
class cs {
|
|
3777
3777
|
constructor(...e) {
|
|
3778
|
-
m(this,
|
|
3779
|
-
return h(this,
|
|
3778
|
+
m(this, ke, []);
|
|
3779
|
+
return h(this, ke, e), this;
|
|
3780
3780
|
}
|
|
3781
3781
|
get values() {
|
|
3782
|
-
return s(this,
|
|
3782
|
+
return s(this, ke);
|
|
3783
3783
|
}
|
|
3784
3784
|
get array() {
|
|
3785
|
-
return s(this,
|
|
3785
|
+
return s(this, ke).map((e) => e.array);
|
|
3786
3786
|
}
|
|
3787
3787
|
get dimension() {
|
|
3788
|
-
return [s(this,
|
|
3788
|
+
return [s(this, ke).length, s(this, ke)[0].dimension];
|
|
3789
3789
|
}
|
|
3790
3790
|
isSquare() {
|
|
3791
|
-
return s(this,
|
|
3791
|
+
return s(this, ke).length === s(this, ke)[0].dimension;
|
|
3792
3792
|
}
|
|
3793
3793
|
determinant() {
|
|
3794
3794
|
if (!this.isSquare())
|
|
@@ -3796,19 +3796,19 @@ class cs {
|
|
|
3796
3796
|
return hs(...this.values);
|
|
3797
3797
|
}
|
|
3798
3798
|
}
|
|
3799
|
-
|
|
3800
|
-
var
|
|
3799
|
+
ke = new WeakMap();
|
|
3800
|
+
var Me, Ue;
|
|
3801
3801
|
const mi = class mi {
|
|
3802
3802
|
constructor(e) {
|
|
3803
|
-
m(this,
|
|
3804
|
-
m(this, Ue, new
|
|
3803
|
+
m(this, Me, new E(0, 0, 1));
|
|
3804
|
+
m(this, Ue, new S(0, 0, 0));
|
|
3805
3805
|
return e && this.parse(e), this;
|
|
3806
3806
|
}
|
|
3807
3807
|
get normal() {
|
|
3808
|
-
return s(this,
|
|
3808
|
+
return s(this, Me);
|
|
3809
3809
|
}
|
|
3810
3810
|
set normal(e) {
|
|
3811
|
-
h(this,
|
|
3811
|
+
h(this, Me, e), s(this, Me).asPoint = !1;
|
|
3812
3812
|
}
|
|
3813
3813
|
get point() {
|
|
3814
3814
|
return s(this, Ue);
|
|
@@ -3817,16 +3817,16 @@ const mi = class mi {
|
|
|
3817
3817
|
h(this, Ue, e), s(this, Ue).asPoint = !0;
|
|
3818
3818
|
}
|
|
3819
3819
|
get a() {
|
|
3820
|
-
return s(this,
|
|
3820
|
+
return s(this, Me).x;
|
|
3821
3821
|
}
|
|
3822
3822
|
get b() {
|
|
3823
|
-
return s(this,
|
|
3823
|
+
return s(this, Me).y;
|
|
3824
3824
|
}
|
|
3825
3825
|
get c() {
|
|
3826
|
-
return s(this,
|
|
3826
|
+
return s(this, Me).z;
|
|
3827
3827
|
}
|
|
3828
3828
|
get d() {
|
|
3829
|
-
return s(this,
|
|
3829
|
+
return s(this, Me).dot(s(this, Ue)).opposite();
|
|
3830
3830
|
}
|
|
3831
3831
|
get tex() {
|
|
3832
3832
|
return new H(
|
|
@@ -3848,7 +3848,7 @@ const mi = class mi {
|
|
|
3848
3848
|
}
|
|
3849
3849
|
if (e.equation) {
|
|
3850
3850
|
const r = e.equation.moveLeft().reduce().left, l = r.monomByLetter("x").coefficient, c = r.monomByLetter("y").coefficient, f = r.monomByLetter("z").coefficient, d = r.monomByDegree(0).coefficient;
|
|
3851
|
-
this.normal = new E(l, c, f), l.isNotZero() ? this.point = new
|
|
3851
|
+
this.normal = new E(l, c, f), l.isNotZero() ? this.point = new S(d.clone().divide(l).opposite(), 0, 0) : c.isNotZero() ? this.point = new S(0, d.clone().divide(c).opposite(), 0) : this.point = new S(0, 0, d.clone().divide(f).opposite());
|
|
3852
3852
|
return;
|
|
3853
3853
|
}
|
|
3854
3854
|
if (((i = e.points) == null ? void 0 : i.length) === 3 && e.points.every((r) => r instanceof E)) {
|
|
@@ -3858,7 +3858,7 @@ const mi = class mi {
|
|
|
3858
3858
|
}
|
|
3859
3859
|
if (((n = e.coefficients) == null ? void 0 : n.length) === 4) {
|
|
3860
3860
|
const [r, l, c, f] = e.coefficients;
|
|
3861
|
-
this.normal = new E(r, l, c), this.point = new
|
|
3861
|
+
this.normal = new E(r, l, c), this.point = new S(0, 0, -f);
|
|
3862
3862
|
return;
|
|
3863
3863
|
}
|
|
3864
3864
|
}
|
|
@@ -3882,29 +3882,29 @@ const mi = class mi {
|
|
|
3882
3882
|
return t.clone().add(i.clone().multiplyByScalar(n));
|
|
3883
3883
|
}
|
|
3884
3884
|
intersectWithPlane(e) {
|
|
3885
|
-
throw this.normal.cross(e.normal), new
|
|
3885
|
+
throw this.normal.cross(e.normal), new S(0, 0, 0), new Error("Intersection with plane not yet implemented !");
|
|
3886
3886
|
}
|
|
3887
3887
|
isPointOnPlane(e) {
|
|
3888
3888
|
return this.normal.dot(e).add(this.d).isZero();
|
|
3889
3889
|
}
|
|
3890
3890
|
};
|
|
3891
|
-
|
|
3891
|
+
Me = new WeakMap(), Ue = new WeakMap();
|
|
3892
3892
|
let ai = mi;
|
|
3893
|
-
var Y, _, ee, st, Ce, yt, Xt, wt,
|
|
3893
|
+
var Y, _, ee, st, Ce, yt, Xt, wt, Se, Yt, nt;
|
|
3894
3894
|
const Qt = class Qt {
|
|
3895
3895
|
constructor(...e) {
|
|
3896
|
-
m(this, Y, new
|
|
3897
|
-
m(this, _, new
|
|
3898
|
-
m(this, ee, new
|
|
3896
|
+
m(this, Y, new S());
|
|
3897
|
+
m(this, _, new S());
|
|
3898
|
+
m(this, ee, new S());
|
|
3899
3899
|
m(this, st, {
|
|
3900
3900
|
AB: new R(),
|
|
3901
3901
|
AC: new R(),
|
|
3902
3902
|
BC: new R()
|
|
3903
3903
|
});
|
|
3904
3904
|
m(this, Ce, {
|
|
3905
|
-
AB: new
|
|
3906
|
-
AC: new
|
|
3907
|
-
BC: new
|
|
3905
|
+
AB: new S(),
|
|
3906
|
+
AC: new S(),
|
|
3907
|
+
BC: new S()
|
|
3908
3908
|
});
|
|
3909
3909
|
m(this, yt, null);
|
|
3910
3910
|
// ------------------------------------------
|
|
@@ -3947,7 +3947,7 @@ const Qt = class Qt {
|
|
|
3947
3947
|
h(this, Y, r.point.clone());
|
|
3948
3948
|
else
|
|
3949
3949
|
throw new Error("Lines do not intersect !");
|
|
3950
|
-
} else e.every((t) => t instanceof
|
|
3950
|
+
} else e.every((t) => t instanceof S) && (h(this, Y, e[0].clone()), h(this, _, e[1].clone()), h(this, ee, e[2].clone()), h(this, st, {
|
|
3951
3951
|
AB: new R(s(this, Y), s(this, _)),
|
|
3952
3952
|
BC: new R(s(this, _), s(this, ee)),
|
|
3953
3953
|
AC: new R(s(this, Y), s(this, ee))
|
|
@@ -3972,9 +3972,9 @@ const Qt = class Qt {
|
|
|
3972
3972
|
*/
|
|
3973
3973
|
m(this, Xt, () => {
|
|
3974
3974
|
s(this, Y).asPoint = !0, s(this, _).asPoint = !0, s(this, ee).asPoint = !0, h(this, Ce, {
|
|
3975
|
-
AB: new
|
|
3976
|
-
AC: new
|
|
3977
|
-
BC: new
|
|
3975
|
+
AB: new S().middleOf(s(this, Y), s(this, _)),
|
|
3976
|
+
AC: new S().middleOf(s(this, Y), s(this, ee)),
|
|
3977
|
+
BC: new S().middleOf(s(this, _), s(this, ee))
|
|
3978
3978
|
}), h(this, yt, s(this, Yt).call(this));
|
|
3979
3979
|
});
|
|
3980
3980
|
/**
|
|
@@ -3997,7 +3997,7 @@ const Qt = class Qt {
|
|
|
3997
3997
|
* @param ptName1
|
|
3998
3998
|
* @param ptName2
|
|
3999
3999
|
*/
|
|
4000
|
-
m(this,
|
|
4000
|
+
m(this, Se, (e, t) => new E(
|
|
4001
4001
|
s(this, wt).call(this, e),
|
|
4002
4002
|
s(this, wt).call(this, t)
|
|
4003
4003
|
));
|
|
@@ -4059,22 +4059,22 @@ const Qt = class Qt {
|
|
|
4059
4059
|
return s(this, ee);
|
|
4060
4060
|
}
|
|
4061
4061
|
get AB() {
|
|
4062
|
-
return s(this,
|
|
4062
|
+
return s(this, Se).call(this, "A", "B");
|
|
4063
4063
|
}
|
|
4064
4064
|
get BA() {
|
|
4065
|
-
return s(this,
|
|
4065
|
+
return s(this, Se).call(this, "B", "A");
|
|
4066
4066
|
}
|
|
4067
4067
|
get BC() {
|
|
4068
|
-
return s(this,
|
|
4068
|
+
return s(this, Se).call(this, "B", "C");
|
|
4069
4069
|
}
|
|
4070
4070
|
get CB() {
|
|
4071
|
-
return s(this,
|
|
4071
|
+
return s(this, Se).call(this, "C", "B");
|
|
4072
4072
|
}
|
|
4073
4073
|
get AC() {
|
|
4074
|
-
return s(this,
|
|
4074
|
+
return s(this, Se).call(this, "A", "C");
|
|
4075
4075
|
}
|
|
4076
4076
|
get CA() {
|
|
4077
|
-
return s(this,
|
|
4077
|
+
return s(this, Se).call(this, "C", "A");
|
|
4078
4078
|
}
|
|
4079
4079
|
get isRectangle() {
|
|
4080
4080
|
return !!(this.AB.isNormalTo(this.BC) || this.AB.isNormalTo(this.AC) || this.BC.isNormalTo(this.AC));
|
|
@@ -4092,7 +4092,7 @@ const Qt = class Qt {
|
|
|
4092
4092
|
return s(this, yt);
|
|
4093
4093
|
}
|
|
4094
4094
|
};
|
|
4095
|
-
Y = new WeakMap(), _ = new WeakMap(), ee = new WeakMap(), st = new WeakMap(), Ce = new WeakMap(), yt = new WeakMap(), Xt = new WeakMap(), wt = new WeakMap(),
|
|
4095
|
+
Y = new WeakMap(), _ = new WeakMap(), ee = new WeakMap(), st = new WeakMap(), Ce = new WeakMap(), yt = new WeakMap(), Xt = new WeakMap(), wt = new WeakMap(), Se = new WeakMap(), Yt = new WeakMap(), nt = new WeakMap();
|
|
4096
4096
|
let li = Qt;
|
|
4097
4097
|
function qt(o) {
|
|
4098
4098
|
const e = Object.assign(
|
|
@@ -4123,7 +4123,7 @@ function Ri(o) {
|
|
|
4123
4123
|
zero: !1
|
|
4124
4124
|
},
|
|
4125
4125
|
o
|
|
4126
|
-
), t = new
|
|
4126
|
+
), t = new M();
|
|
4127
4127
|
if (t.coefficient = qt({
|
|
4128
4128
|
zero: e.zero,
|
|
4129
4129
|
reduced: !0,
|
|
@@ -4213,7 +4213,7 @@ function ci(o) {
|
|
|
4213
4213
|
},
|
|
4214
4214
|
o
|
|
4215
4215
|
), t = e.axis === "x", i = e.axis === "y", n = e.fraction ? qt({ max: e.max, zero: t }) : new u(Q(e.max, t)), r = e.fraction ? qt({ max: e.max, zero: i }) : new u(Q(e.max, i));
|
|
4216
|
-
return Number(e.quadrant) === 1 && (n.abs(), r.abs()), Number(e.quadrant) === 2 && (n.isPositive() && n.opposite(), r.isNegative() && r.opposite()), Number(e.quadrant) === 3 && (n.isPositive() && n.opposite(), r.isPositive() && r.opposite()), Number(e.quadrant) === 4 && (n.isNegative() && n.opposite(), r.isPositive() && r.opposite()), new
|
|
4216
|
+
return Number(e.quadrant) === 1 && (n.abs(), r.abs()), Number(e.quadrant) === 2 && (n.isPositive() && n.opposite(), r.isNegative() && r.opposite()), Number(e.quadrant) === 3 && (n.isPositive() && n.opposite(), r.isPositive() && r.opposite()), Number(e.quadrant) === 4 && (n.isNegative() && n.opposite(), r.isPositive() && r.opposite()), new S(n, r);
|
|
4217
4217
|
}
|
|
4218
4218
|
function ds(o) {
|
|
4219
4219
|
const e = Object.assign(
|
|
@@ -4261,7 +4261,7 @@ function ms(o) {
|
|
|
4261
4261
|
}
|
|
4262
4262
|
},
|
|
4263
4263
|
o
|
|
4264
|
-
), t = new
|
|
4264
|
+
), t = new S(e.A.x, e.A.y, e.A.z), i = new E(e.direction.x, e.direction.y, e.direction.z);
|
|
4265
4265
|
return new Ot(t, i);
|
|
4266
4266
|
}
|
|
4267
4267
|
const gs = {
|
|
@@ -4288,18 +4288,18 @@ const gs = {
|
|
|
4288
4288
|
Numeric: U,
|
|
4289
4289
|
Fraction: u,
|
|
4290
4290
|
Root: vt,
|
|
4291
|
-
Monom:
|
|
4291
|
+
Monom: M,
|
|
4292
4292
|
Polynom: O,
|
|
4293
4293
|
Equation: H,
|
|
4294
4294
|
Matrix: cs,
|
|
4295
4295
|
LinearSystem: ti,
|
|
4296
|
-
Factor:
|
|
4296
|
+
Factor: se,
|
|
4297
4297
|
PolyFactor: si,
|
|
4298
4298
|
LogicalSet: ss,
|
|
4299
4299
|
Random: gs,
|
|
4300
4300
|
Geometry: {
|
|
4301
4301
|
Vector: E,
|
|
4302
|
-
Point:
|
|
4302
|
+
Point: S,
|
|
4303
4303
|
Line: R,
|
|
4304
4304
|
Triangle: li,
|
|
4305
4305
|
Circle: Tt,
|
|
@@ -4313,19 +4313,19 @@ export {
|
|
|
4313
4313
|
H as Equation,
|
|
4314
4314
|
At as EquationSolver,
|
|
4315
4315
|
lt as FACTOR_DISPLAY,
|
|
4316
|
-
|
|
4316
|
+
se as Factor,
|
|
4317
4317
|
u as Fraction,
|
|
4318
4318
|
R as Line,
|
|
4319
4319
|
Ot as Line3,
|
|
4320
4320
|
ti as LinearSystem,
|
|
4321
4321
|
ss as LogicalSet,
|
|
4322
4322
|
cs as Matrix,
|
|
4323
|
-
|
|
4323
|
+
M as Monom,
|
|
4324
4324
|
vt as NthRoot,
|
|
4325
4325
|
is as NumExp,
|
|
4326
4326
|
U as Numeric,
|
|
4327
4327
|
ai as Plane3,
|
|
4328
|
-
|
|
4328
|
+
S as Point,
|
|
4329
4329
|
si as PolyFactor,
|
|
4330
4330
|
O as Polynom,
|
|
4331
4331
|
gs as Random,
|