pimath 0.1.7 → 0.1.8

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 CHANGED
@@ -39,15 +39,15 @@ function ni(...o) {
39
39
  ;
40
40
  return Math.abs(t);
41
41
  }
42
- function Bi(...o) {
42
+ function Pi(...o) {
43
43
  return o.reduce(function(e, t) {
44
44
  return Math.abs(e * t / ni(e, t));
45
45
  });
46
46
  }
47
- function Si(o, e = 3) {
47
+ function Bi(o, e = 3) {
48
48
  return +o.toFixed(e);
49
49
  }
50
- function Pi(o) {
50
+ function Si(o) {
51
51
  if (Number.isSafeInteger(o) || o.toString().split(".")[0].length < 10)
52
52
  return 0;
53
53
  throw new Error("Periodic value: Not implemented yet");
@@ -71,21 +71,21 @@ const G = {
71
71
  dividers: ui,
72
72
  divideNumbersByGCD: Ii,
73
73
  gcd: ni,
74
- lcm: Bi,
75
- numberCorrection: Si,
76
- periodic: Pi,
74
+ lcm: Pi,
75
+ numberCorrection: Bi,
76
+ periodic: Si,
77
77
  primes: Ri,
78
78
  pythagoreanTripletsWithTarget: zi,
79
79
  round: Li
80
80
  };
81
- var w, b, ht, Pe;
81
+ var w, b, ht, Se;
82
82
  const $ = class $ {
83
83
  constructor(e, t) {
84
84
  // #region Class fields (2)
85
85
  d(this, w, 1);
86
86
  d(this, b, 1);
87
87
  d(this, ht, !1);
88
- d(this, Pe, "frac");
88
+ d(this, Se, "frac");
89
89
  // ------------------------------------------
90
90
  /**
91
91
  * Parse the value to get the numerator and denominator
@@ -272,17 +272,17 @@ const $ = class $ {
272
272
  h(this, w, e);
273
273
  }
274
274
  get tfrac() {
275
- return h(this, Pe, "tfrac"), this;
275
+ return h(this, Se, "tfrac"), this;
276
276
  }
277
277
  get dfrac() {
278
- return h(this, Pe, "dfrac"), this;
278
+ return h(this, Se, "dfrac"), this;
279
279
  }
280
280
  get frac() {
281
- return h(this, Pe, "frac"), this;
281
+ return h(this, Se, "frac"), this;
282
282
  }
283
283
  // Display getter
284
284
  get tex() {
285
- return this.isInfinity() ? `${this.sign() === 1 ? "+" : "-"}\\infty` : this.isExact() ? i(this, b) === 1 ? `${i(this, w)}` : i(this, w) < 0 ? `-\\${i(this, Pe)}{ ${-i(this, w)} }{ ${i(this, b)} }` : `\\${i(this, Pe)}{ ${i(this, w)} }{ ${i(this, b)} }` : this.value.toFixed(3);
285
+ return this.isInfinity() ? `${this.sign() === 1 ? "+" : "-"}\\infty` : this.isExact() ? i(this, b) === 1 ? `${i(this, w)}` : i(this, w) < 0 ? `-\\${i(this, Se)}{ ${-i(this, w)} }{ ${i(this, b)} }` : `\\${i(this, Se)}{ ${i(this, w)} }{ ${i(this, b)} }` : this.value.toFixed(3);
286
286
  }
287
287
  get texWithSign() {
288
288
  return this.isPositive() ? `+${this.tex}` : this.tex;
@@ -292,7 +292,7 @@ const $ = class $ {
292
292
  }
293
293
  // #endregion Getters And Setters (11)
294
294
  };
295
- w = new WeakMap(), b = new WeakMap(), ht = new WeakMap(), Pe = new WeakMap(), a($, "average", (...e) => {
295
+ w = new WeakMap(), b = new WeakMap(), ht = new WeakMap(), Se = new WeakMap(), a($, "average", (...e) => {
296
296
  const t = new $().zero();
297
297
  for (const s of e)
298
298
  t.add(s);
@@ -1197,10 +1197,10 @@ a(I, "xMultiply", (...e) => {
1197
1197
  return t;
1198
1198
  });
1199
1199
  let k = I;
1200
- var ue, Ze, B, ye, rt, pi, mi, gi, Qt, yi;
1200
+ var ue, Ze, P, ye, rt, pi, mi, gi, Qt, yi;
1201
1201
  const hi = class hi {
1202
1202
  constructor(e, t, s = "x") {
1203
- d(this, B);
1203
+ d(this, P);
1204
1204
  d(this, ue);
1205
1205
  d(this, Ze);
1206
1206
  if (h(this, Ze, s), Object.hasOwn(e, "moveLeft")) {
@@ -1211,25 +1211,25 @@ const hi = class hi {
1211
1211
  }
1212
1212
  solve() {
1213
1213
  if (i(this, ue).degree().isOne())
1214
- return q(this, B, pi).call(this);
1214
+ return q(this, P, pi).call(this);
1215
1215
  if (i(this, ue).degree().value === 2)
1216
- return q(this, B, mi).call(this);
1217
- const e = q(this, B, yi).call(this);
1216
+ return q(this, P, mi).call(this);
1217
+ const e = q(this, P, yi).call(this);
1218
1218
  if (e.length > 0)
1219
1219
  return e;
1220
1220
  if (i(this, ue).degree().value === 3)
1221
- return q(this, B, Qt).call(this);
1221
+ return q(this, P, Qt).call(this);
1222
1222
  throw new Error("The equation degree is too high.");
1223
1223
  }
1224
1224
  solveAsCardan() {
1225
1225
  if (i(this, ue).degree().value !== 3)
1226
1226
  throw new Error("The equation is not cubic.");
1227
- return q(this, B, Qt).call(this);
1227
+ return q(this, P, Qt).call(this);
1228
1228
  }
1229
1229
  };
1230
- ue = new WeakMap(), Ze = new WeakMap(), B = new WeakSet(), ye = function(e) {
1230
+ ue = new WeakMap(), Ze = new WeakMap(), P = new WeakSet(), ye = function(e) {
1231
1231
  if (e instanceof c && e.isApproximative())
1232
- return q(this, B, rt).call(this, e.value);
1232
+ return q(this, P, rt).call(this, e.value);
1233
1233
  const t = new c(e);
1234
1234
  return {
1235
1235
  variable: i(this, Ze),
@@ -1249,7 +1249,7 @@ ue = new WeakMap(), Ze = new WeakMap(), B = new WeakSet(), ye = function(e) {
1249
1249
  }, pi = function() {
1250
1250
  const e = i(this, ue).monomByDegree(0).coefficient.clone().opposite().divide(i(this, ue).monomByDegree(1).coefficient);
1251
1251
  return [
1252
- q(this, B, ye).call(this, e)
1252
+ q(this, P, ye).call(this, e)
1253
1253
  ];
1254
1254
  }, mi = function() {
1255
1255
  const e = i(this, ue), t = e.monomByDegree(2).coefficient, s = e.monomByDegree(1).coefficient, n = e.monomByDegree(0).coefficient, r = s.clone().pow(2).subtract(t.clone().multiply(n).multiply(4));
@@ -1257,12 +1257,12 @@ ue = new WeakMap(), Ze = new WeakMap(), B = new WeakSet(), ye = function(e) {
1257
1257
  return [];
1258
1258
  if (r.isSquare()) {
1259
1259
  const l = r.sqrt(), u = s.clone().opposite().add(l).divide(t.clone().multiply(2)), f = s.clone().opposite().subtract(l).divide(t.clone().multiply(2));
1260
- return l.isZero() ? [q(this, B, ye).call(this, u)] : [
1261
- q(this, B, ye).call(this, u),
1262
- q(this, B, ye).call(this, f)
1260
+ return l.isZero() ? [q(this, P, ye).call(this, u)] : [
1261
+ q(this, P, ye).call(this, u),
1262
+ q(this, P, ye).call(this, f)
1263
1263
  ].sort((m, g) => m.value - g.value);
1264
1264
  }
1265
- return q(this, B, gi).call(this, t, s, r);
1265
+ return q(this, P, gi).call(this, t, s, r);
1266
1266
  }, gi = function(e, t, s) {
1267
1267
  const n = G.dividers(s.value).filter((pe) => Math.sqrt(pe) % 1 === 0).map((pe) => Math.sqrt(pe)).pop() ?? 1, r = G.gcd(2 * e.value, t.value, n) * (e.isNegative() ? -1 : 1), l = t.clone().divide(r).opposite(), u = e.clone().divide(r).multiply(2), f = s.clone().divide(n ** 2), m = Math.abs(n / r), g = n === 1 ? "-" : `-${m} `, E = n === 1 ? "+" : `+${m} `;
1268
1268
  function L(pe, ce, it, Wt) {
@@ -1273,11 +1273,11 @@ ue = new WeakMap(), Ze = new WeakMap(), B = new WeakSet(), ye = function(e) {
1273
1273
  }
1274
1274
  const ae = s.value ** 0.5, le = (-t.value - ae) / (2 * e.value), ge = (-t.value + ae) / (2 * e.value);
1275
1275
  return [
1276
- q(this, B, rt).call(this, le, {
1276
+ q(this, P, rt).call(this, le, {
1277
1277
  tex: L(u.tex, l.tex, g.toString(), f.tex),
1278
1278
  display: te(u.display, l.display, g.toString(), f.display)
1279
1279
  }),
1280
- q(this, B, rt).call(this, ge, {
1280
+ q(this, P, rt).call(this, ge, {
1281
1281
  tex: L(u.tex, l.tex, E.toString(), f.tex),
1282
1282
  display: te(u.display, l.display, E.toString(), f.display)
1283
1283
  })
@@ -1286,20 +1286,20 @@ ue = new WeakMap(), Ze = new WeakMap(), B = new WeakSet(), ye = function(e) {
1286
1286
  const e = i(this, ue), t = e.monomByDegree(3).coefficient, s = e.monomByDegree(2).coefficient, n = e.monomByDegree(1).coefficient, r = e.monomByDegree(0).coefficient, l = s.clone().divide(t), u = n.clone().divide(t), f = r.clone().divide(t), m = u.clone().subtract(l.clone().pow(2).divide(3)), g = f.clone().subtract(l.clone().multiply(u).divide(3)).add(l.clone().pow(3).multiply(2).divide(27)), E = g.clone().opposite(), L = m.clone().opposite().pow(3).divide(27), te = E.clone().pow(2).subtract(L.clone().multiply(4)).opposite();
1287
1287
  if (te.isNegative()) {
1288
1288
  const ae = g.clone().opposite().add(te.clone().opposite().sqrt()).divide(2).root(3), le = g.clone().opposite().subtract(te.clone().opposite().sqrt()).divide(2).root(3), ge = ae.clone().add(le).subtract(l.clone().divide(3));
1289
- return [q(this, B, ye).call(this, ge)];
1289
+ return [q(this, P, ye).call(this, ge)];
1290
1290
  }
1291
1291
  if (te.isZero()) {
1292
1292
  const ae = g.clone().opposite().divide(2).root(3), le = ae.clone().opposite().subtract(l.clone().divide(3)), ge = ae.clone().multiply(2).subtract(l.clone().divide(3));
1293
- return le.isEqual(ge) ? [q(this, B, ye).call(this, le)] : [
1294
- q(this, B, ye).call(this, ge),
1295
- q(this, B, ye).call(this, le)
1293
+ return le.isEqual(ge) ? [q(this, P, ye).call(this, le)] : [
1294
+ q(this, P, ye).call(this, ge),
1295
+ q(this, P, ye).call(this, le)
1296
1296
  ].sort((pe, ce) => pe.value - ce.value);
1297
1297
  }
1298
1298
  if (te.isPositive()) {
1299
1299
  const ae = [], le = m.value, ge = g.value, pe = l.value;
1300
1300
  for (let ce = 0; ce < 3; ce++)
1301
1301
  ae.push(2 * Math.sqrt(-le / 3) * Math.cos(Math.acos(3 * ge / (2 * le) * Math.sqrt(-3 / le)) / 3 + 2 * Math.PI * ce / 3) - pe / 3);
1302
- return ae.map((ce) => q(this, B, rt).call(this, ce)).sort((ce, it) => ce.value - it.value);
1302
+ return ae.map((ce) => q(this, P, rt).call(this, ce)).sort((ce, it) => ce.value - it.value);
1303
1303
  }
1304
1304
  return [];
1305
1305
  }, yi = function() {
@@ -1309,12 +1309,12 @@ ue = new WeakMap(), Ze = new WeakMap(), B = new WeakSet(), ye = function(e) {
1309
1309
  const n = e.monomByDegree().coefficient;
1310
1310
  let r = e.monomByDegree(0).coefficient;
1311
1311
  for (; r.isZero(); )
1312
- t.length === 0 && t.push(q(this, B, ye).call(this, 0)), e = e.divide("x"), r = e.monomByDegree(0).coefficient;
1312
+ t.length === 0 && t.push(q(this, P, ye).call(this, 0)), e = e.divide("x"), r = e.monomByDegree(0).coefficient;
1313
1313
  const l = G.dividers(n.value), u = G.dividers(r.value);
1314
1314
  for (const g of l)
1315
1315
  for (const E of u) {
1316
1316
  const L = new c(E, g);
1317
- e.evaluate(L).isZero() && !t.find((te) => te.value === L.value) && t.push(q(this, B, ye).call(this, L)), L.opposite(), e.evaluate(L).isZero() && !t.find((te) => te.value === L.value) && t.push(q(this, B, ye).call(this, L));
1317
+ e.evaluate(L).isZero() && !t.find((te) => te.value === L.value) && t.push(q(this, P, ye).call(this, L)), L.opposite(), e.evaluate(L).isZero() && !t.find((te) => te.value === L.value) && t.push(q(this, P, ye).call(this, L));
1318
1318
  }
1319
1319
  for (const g of t) {
1320
1320
  if (g.exact !== !1 && g.exact.isZero())
@@ -1333,7 +1333,7 @@ ue = new WeakMap(), Ze = new WeakMap(), B = new WeakSet(), ye = function(e) {
1333
1333
  return t = t.concat(m.solve()), t.sort((g, E) => g.value - E.value);
1334
1334
  };
1335
1335
  let wt = hi;
1336
- var Fe, y, Qe, at, Tt, Ot, At, qt, lt, Mt, kt, Ct, $t, wi, It, Ke, Bt;
1336
+ var Fe, y, Qe, at, Tt, At, Ot, qt, lt, Mt, kt, Ct, $t, wi, It, Ke, Pt;
1337
1337
  const C = class C {
1338
1338
  constructor(e, ...t) {
1339
1339
  d(this, $t);
@@ -1438,7 +1438,7 @@ const C = class C {
1438
1438
  });
1439
1439
  a(this, "evaluate", (e, t) => {
1440
1440
  if (t)
1441
- return i(this, Ot).call(this, e);
1441
+ return i(this, At).call(this, e);
1442
1442
  const s = new c().zero();
1443
1443
  return i(this, y).forEach((n) => {
1444
1444
  s.add(n.evaluate(e, t));
@@ -1674,13 +1674,13 @@ const C = class C {
1674
1674
  s.coefficient.divide(t);
1675
1675
  return this;
1676
1676
  });
1677
- d(this, Ot, (e) => {
1677
+ d(this, At, (e) => {
1678
1678
  let t = 0;
1679
1679
  return i(this, y).forEach((s) => {
1680
1680
  t += s.evaluate(e, !0);
1681
1681
  }), t;
1682
1682
  });
1683
- d(this, At, (e) => {
1683
+ d(this, Ot, (e) => {
1684
1684
  var E;
1685
1685
  let t, s, n, r, l, u, f, m, g;
1686
1686
  if (this.numberOfVars === 1)
@@ -1693,7 +1693,7 @@ const C = class C {
1693
1693
  new C(e).subtract(m.display).multiply(m.denominator)
1694
1694
  ]) : [this.clone()];
1695
1695
  if (n = this.monomByDegree(2, e), r = this.monomByDegree(1, e), l = this.monomByDegree(0, e), n.isLiteralSquare() && l.isLiteralSquare() && r.clone().pow(2).isSameAs(n.clone().multiply(l))) {
1696
- const L = new C("x", n.coefficient, r.coefficient, l.coefficient), te = i(E = L, At).call(E, "x"), ae = [];
1696
+ const L = new C("x", n.coefficient, r.coefficient, l.coefficient), te = i(E = L, Ot).call(E, "x"), ae = [];
1697
1697
  let le;
1698
1698
  if (te.length >= 2) {
1699
1699
  for (const ge of te)
@@ -1753,10 +1753,10 @@ const C = class C {
1753
1753
  e.push(n.multiply(s));
1754
1754
  else if (t.token === "/")
1755
1755
  s.degree().isStrictlyPositive() ? console.log("divide by a polynom -> should create a rational polynom !") : e.push(n.divide(s.monoms[0].coefficient));
1756
- else if (t.token === "^")
1756
+ else if (t.token === "^") {
1757
1757
  if (s.degree().isStrictlyPositive())
1758
- console.error("Cannot elevate a polynom with another polynom !", n.tex, s.tex);
1759
- else if (s.monoms[0].coefficient.isRelative())
1758
+ throw new Error("Cannot elevate a polynom with another polynom !");
1759
+ if (s.monoms[0].coefficient.isRelative())
1760
1760
  e.push(n.pow(s.monoms[0].coefficient.value));
1761
1761
  else if (n.monoms.length === 1 && n.monoms[0].coefficient.isOne()) {
1762
1762
  for (const r in n.monoms[0].literal)
@@ -1764,6 +1764,7 @@ const C = class C {
1764
1764
  e.push(n);
1765
1765
  } else
1766
1766
  console.error("Cannot have power with fraction");
1767
+ }
1767
1768
  } else if (t.token === "-") {
1768
1769
  const s = e.pop();
1769
1770
  s && e.push(s.opposite());
@@ -1792,7 +1793,7 @@ const C = class C {
1792
1793
  * Main parse using a shutting yard class
1793
1794
  * @param inputStr
1794
1795
  */
1795
- d(this, Bt, (e) => {
1796
+ d(this, Pt, (e) => {
1796
1797
  const s = new Gt().parse(e).rpn;
1797
1798
  this.zero();
1798
1799
  const n = [];
@@ -1858,14 +1859,14 @@ const C = class C {
1858
1859
  }
1859
1860
  // #endregion Private methods (15)
1860
1861
  };
1861
- Fe = new WeakMap(), y = new WeakMap(), Qe = new WeakMap(), at = new WeakMap(), Tt = new WeakMap(), Ot = new WeakMap(), At = new WeakMap(), qt = new WeakMap(), lt = new WeakMap(), Mt = new WeakMap(), kt = new WeakMap(), Ct = new WeakMap(), $t = new WeakSet(), wi = function(e, ...t) {
1862
+ Fe = new WeakMap(), y = new WeakMap(), Qe = new WeakMap(), at = new WeakMap(), Tt = new WeakMap(), At = new WeakMap(), Ot = new WeakMap(), qt = new WeakMap(), lt = new WeakMap(), Mt = new WeakMap(), kt = new WeakMap(), Ct = new WeakMap(), $t = new WeakSet(), wi = function(e, ...t) {
1862
1863
  if (t.length === 0) {
1863
1864
  if (e = "" + e, e !== "" && !isNaN(Number(e))) {
1864
1865
  this.empty();
1865
1866
  const s = new k(e);
1866
1867
  return this.add(s), this;
1867
1868
  }
1868
- return i(this, Bt).call(this, e);
1869
+ return i(this, Pt).call(this, e);
1869
1870
  } else if (/^[a-z]+/.test(e)) {
1870
1871
  this.empty();
1871
1872
  const s = t.map((n) => new c(n));
@@ -1886,8 +1887,8 @@ Fe = new WeakMap(), y = new WeakMap(), Qe = new WeakMap(), at = new WeakMap(), T
1886
1887
  return this;
1887
1888
  } else
1888
1889
  return this.zero();
1889
- }, It = new WeakMap(), Ke = new WeakMap(), Bt = new WeakMap();
1890
- let A = C;
1890
+ }, It = new WeakMap(), Ke = new WeakMap(), Pt = new WeakMap();
1891
+ let O = C;
1891
1892
  function ci(o, e = !0) {
1892
1893
  return e ? `\\left( ${o} \\right)` : `(${o})`;
1893
1894
  }
@@ -1902,9 +1903,9 @@ const we = class we {
1902
1903
  h(this, Ne, e.polynom.clone()), h(this, Te, e.power.clone());
1903
1904
  else if (typeof e == "string" && t === void 0) {
1904
1905
  const [s, n = "1"] = e.split("^");
1905
- h(this, Ne, new A(s)), h(this, Te, new c(n.replace("(", "").replace(")", "")));
1906
+ h(this, Ne, new O(s)), h(this, Te, new c(n.replace("(", "").replace(")", "")));
1906
1907
  } else
1907
- h(this, Ne, new A(e)), h(this, Te, new c(t ?? 1));
1908
+ h(this, Ne, new O(e)), h(this, Te, new c(t ?? 1));
1908
1909
  return h(this, Ee, 1), this;
1909
1910
  }
1910
1911
  parse() {
@@ -1948,7 +1949,7 @@ const we = class we {
1948
1949
  divide(e) {
1949
1950
  if (e instanceof we && this.isSameAs(e))
1950
1951
  return this.power.subtract(e.power), this;
1951
- const t = new A(e);
1952
+ const t = new O(e);
1952
1953
  if (this.isSameAs(t))
1953
1954
  return this.power.subtract(1), this;
1954
1955
  throw new Error("The two factors must be the same");
@@ -1970,7 +1971,7 @@ const we = class we {
1970
1971
  }
1971
1972
  isSameAs(e) {
1972
1973
  let t;
1973
- return e instanceof we ? t = e.polynom : e instanceof A ? t = e : t = new A(e), this.polynom.isEqual(t);
1974
+ return e instanceof we ? t = e.polynom : e instanceof O ? t = e : t = new O(e), this.polynom.isEqual(t);
1974
1975
  }
1975
1976
  isZero() {
1976
1977
  return this.polynom.isZero();
@@ -1978,7 +1979,7 @@ const we = class we {
1978
1979
  multiply(e) {
1979
1980
  if (e instanceof we && this.isSameAs(e))
1980
1981
  return this.power.add(e.power), this;
1981
- const t = new A(e);
1982
+ const t = new O(e);
1982
1983
  if (this.isSameAs(t))
1983
1984
  return this.power.add(1), this;
1984
1985
  throw new Error("The two factors must be the same");
@@ -2033,11 +2034,11 @@ const we = class we {
2033
2034
  };
2034
2035
  Ee = new WeakMap(), Je = new WeakMap(), Ne = new WeakMap(), Te = new WeakMap();
2035
2036
  let fe = we;
2036
- var We = /* @__PURE__ */ ((o) => (o[o.ROOT = 0] = "ROOT", o[o.POWER = 1] = "POWER", o))(We || {}), O, M, ne, St, _e, Pt;
2037
+ var We = /* @__PURE__ */ ((o) => (o[o.ROOT = 0] = "ROOT", o[o.POWER = 1] = "POWER", o))(We || {}), A, M, ne, Bt, _e, St;
2037
2038
  const xe = class xe {
2038
2039
  constructor(e, t, s) {
2039
2040
  // Left part of the equation
2040
- d(this, O);
2041
+ d(this, A);
2041
2042
  // Right part of the equation
2042
2043
  d(this, M);
2043
2044
  // Signe of the equation
@@ -2046,19 +2047,19 @@ const xe = class xe {
2046
2047
  // #region Properties and methods (26)
2047
2048
  // ------------------------------------------
2048
2049
  a(this, "parse", (e) => {
2049
- const t = i(this, St).call(this, e);
2050
+ const t = i(this, Bt).call(this, e);
2050
2051
  if (t === !1)
2051
2052
  throw new Error("The equation is not valid (no sign found)");
2052
2053
  const s = e.split(t);
2053
- return this.create(new A(s[0]), new A(s[1]), i(this, _e).call(this, t));
2054
+ return this.create(new O(s[0]), new O(s[1]), i(this, _e).call(this, t));
2054
2055
  });
2055
- a(this, "create", (e, t, s) => (h(this, O, e), h(this, M, t), h(this, ne, i(this, _e).call(this, s ?? "=")), this));
2056
- a(this, "clone", () => new xe(i(this, O).clone(), i(this, M).clone(), i(this, ne)));
2056
+ a(this, "create", (e, t, s) => (h(this, A, e), h(this, M, t), h(this, ne, i(this, _e).call(this, s ?? "=")), this));
2057
+ a(this, "clone", () => new xe(i(this, A).clone(), i(this, M).clone(), i(this, ne)));
2057
2058
  /**
2058
2059
  * Get the degree of the equation
2059
2060
  * @param letter
2060
2061
  */
2061
- a(this, "degree", (e) => c.max(i(this, O).degree(e), i(this, M).degree(e)));
2062
+ a(this, "degree", (e) => c.max(i(this, A).degree(e), i(this, M).degree(e)));
2062
2063
  /**
2063
2064
  * divide an equation by a given value (transformed as a fraction)
2064
2065
  *
@@ -2089,7 +2090,7 @@ const xe = class xe {
2089
2090
  /**
2090
2091
  * Determine if the equation contains more than one letter/variable.
2091
2092
  */
2092
- a(this, "isMultiVariable", () => i(this, O).isMultiVariable || i(this, M).isMultiVariable);
2093
+ a(this, "isMultiVariable", () => i(this, A).isMultiVariable || i(this, M).isMultiVariable);
2093
2094
  // -----------------------------------------------
2094
2095
  // Equations helpers
2095
2096
  a(this, "isEqualTo", (e) => {
@@ -2104,49 +2105,49 @@ const xe = class xe {
2104
2105
  if (!this.degree(e).isOne() || this.isMultiVariable())
2105
2106
  return !1;
2106
2107
  let t;
2107
- i(this, O).subtract(i(this, M)), i(this, M).zero();
2108
- const s = [...i(this, O).monoms];
2108
+ i(this, A).subtract(i(this, M)), i(this, M).zero();
2109
+ const s = [...i(this, A).monoms];
2109
2110
  for (const r of s)
2110
- r.hasVariable(e) || (t = r.clone(), i(this, O).subtract(t), i(this, M).subtract(t));
2111
- if (i(this, O).length !== 1)
2111
+ r.hasVariable(e) || (t = r.clone(), i(this, A).subtract(t), i(this, M).subtract(t));
2112
+ if (i(this, A).length !== 1)
2112
2113
  return !1;
2113
- const n = i(this, O).monoms[0].coefficient.clone();
2114
- return i(this, O).divide(n), i(this, M).divide(n), this;
2114
+ const n = i(this, A).monoms[0].coefficient.clone();
2115
+ return i(this, A).divide(n), i(this, M).divide(n), this;
2115
2116
  });
2116
2117
  // -----------------------------------------------
2117
2118
  // Equations operations
2118
2119
  // -----------------------------------------------
2119
- a(this, "letters", () => [.../* @__PURE__ */ new Set([...i(this, O).letters(), ...i(this, M).letters()])]);
2120
+ a(this, "letters", () => [.../* @__PURE__ */ new Set([...i(this, A).letters(), ...i(this, M).letters()])]);
2120
2121
  // -----------------------------------------------
2121
2122
  /**
2122
2123
  * Reorder will move all monoms containing a letter on the left, all the other on the right.
2123
2124
  */
2124
- a(this, "moveLeft", () => (i(this, O).subtract(i(this, M)), i(this, M).zero(), this));
2125
+ a(this, "moveLeft", () => (i(this, A).subtract(i(this, M)), i(this, M).zero(), this));
2125
2126
  /**
2126
2127
  * Multiple an equation by a fraction value.
2127
2128
  * @param value
2128
2129
  */
2129
2130
  a(this, "multiply", (e) => {
2130
2131
  const t = new c(e);
2131
- return i(this, O).multiply(t), i(this, M).multiply(t), i(this, ne) !== "=" && t.sign() === -1 && i(this, Pt).call(this), this;
2132
+ return i(this, A).multiply(t), i(this, M).multiply(t), i(this, ne) !== "=" && t.sign() === -1 && i(this, St).call(this), this;
2132
2133
  });
2133
- a(this, "opposite", () => (h(this, O, i(this, O).opposite()), h(this, M, i(this, M).opposite()), this));
2134
- a(this, "reorder", (e) => (i(this, O).subtract(i(this, M)), i(this, M).zero(), i(this, O).reorder(), e ? this : (i(this, O).monoms.filter((t) => t.degree().isZero()).forEach((t) => {
2134
+ a(this, "opposite", () => (h(this, A, i(this, A).opposite()), h(this, M, i(this, M).opposite()), this));
2135
+ a(this, "reorder", (e) => (i(this, A).subtract(i(this, M)), i(this, M).zero(), i(this, A).reorder(), e ? this : (i(this, A).monoms.filter((t) => t.degree().isZero()).forEach((t) => {
2135
2136
  const s = t.clone();
2136
- i(this, O).subtract(s), i(this, M).subtract(s);
2137
- }), i(this, O).reorder(), i(this, M).reorder(), this)));
2137
+ i(this, A).subtract(s), i(this, M).subtract(s);
2138
+ }), i(this, A).reorder(), i(this, M).reorder(), this)));
2138
2139
  // ------------------------------------------
2139
- a(this, "replaceBy", (e, t) => (i(this, O).replaceBy(e, t), i(this, M).replaceBy(e, t), this));
2140
+ a(this, "replaceBy", (e, t) => (i(this, A).replaceBy(e, t), i(this, M).replaceBy(e, t), this));
2140
2141
  /**
2141
2142
  * Multiply by the lcm denominator and divide by the gcm numerators.
2142
2143
  */
2143
- a(this, "simplify", () => (this.multiply(G.lcm(...i(this, O).getDenominators(), ...i(this, M).getDenominators())), this.divide(G.gcd(...i(this, O).getNumerators(), ...i(this, M).getNumerators())), this));
2144
+ a(this, "simplify", () => (this.multiply(G.lcm(...i(this, A).getDenominators(), ...i(this, M).getDenominators())), this.divide(G.gcd(...i(this, A).getNumerators(), ...i(this, M).getNumerators())), this));
2144
2145
  // -----------------------------------------------
2145
2146
  a(this, "solve", () => new wt(this.clone()).solve());
2146
2147
  a(this, "test", (e) => this.left.evaluate(e).isEqual(this.right.evaluate(e)));
2147
2148
  // #endregion Getters And Setters (13)
2148
2149
  // #region Private methods (6)
2149
- d(this, St, (e) => {
2150
+ d(this, Bt, (e) => {
2150
2151
  if (e.includes("geq"))
2151
2152
  return e.includes("\\geq") ? "\\geq" : "geq";
2152
2153
  if (e.includes("leq"))
@@ -2170,12 +2171,12 @@ const xe = class xe {
2170
2171
  // -----------------------------------------------
2171
2172
  // Equations solving algorithms
2172
2173
  d(this, _e, (e) => e === void 0 ? "=" : e.includes("geq") || e.includes(">=") || e.includes("=>") ? ">=" : e.includes(">") ? ">" : e.includes("leq") || e.includes("<=") || e.includes("=<") ? "<=" : e.includes("<") ? "<" : "=");
2173
- d(this, Pt, () => i(this, ne) === "=" ? this : i(this, ne).includes("<") ? (i(this, ne).replace("<", ">"), this) : i(this, ne).includes(">") ? (i(this, ne).replace(">", "<"), this) : this);
2174
- if (h(this, O, new A().zero()), h(this, M, new A().zero()), h(this, ne, "="), e !== void 0 && t === void 0) {
2174
+ d(this, St, () => i(this, ne) === "=" ? this : i(this, ne).includes("<") ? (i(this, ne).replace("<", ">"), this) : i(this, ne).includes(">") ? (i(this, ne).replace(">", "<"), this) : this);
2175
+ if (h(this, A, new O().zero()), h(this, M, new O().zero()), h(this, ne, "="), e !== void 0 && t === void 0) {
2175
2176
  if (e instanceof xe)
2176
2177
  return e.clone();
2177
2178
  typeof e == "string" && this.parse(e);
2178
- } else e !== void 0 && t !== void 0 && (this.left = new A(e), this.right = new A(t));
2179
+ } else e !== void 0 && t !== void 0 && (this.left = new O(e), this.right = new O(t));
2179
2180
  return s !== void 0 && (this.sign = s), this;
2180
2181
  }
2181
2182
  /**
@@ -2188,11 +2189,11 @@ const xe = class xe {
2188
2189
  */
2189
2190
  add(e) {
2190
2191
  if (e instanceof xe)
2191
- return i(this, O).add(e.left), i(this, M).add(e.right), this;
2192
+ return i(this, A).add(e.left), i(this, M).add(e.right), this;
2192
2193
  if (typeof e == "string" && !xe.isEquationString(e))
2193
2194
  return this.add(new xe(e));
2194
- const t = new A(e);
2195
- return i(this, O).add(t), i(this, M).add(t), this;
2195
+ const t = new O(e);
2196
+ return i(this, A).add(t), i(this, M).add(t), this;
2196
2197
  }
2197
2198
  /**
2198
2199
  * Create an Equation using two polynoms.
@@ -2201,29 +2202,29 @@ const xe = class xe {
2201
2202
  * @param asNumeric
2202
2203
  */
2203
2204
  evaluate(e, t) {
2204
- const s = i(this, O).evaluate(e, t), n = i(this, M).evaluate(e, t);
2205
+ const s = i(this, A).evaluate(e, t), n = i(this, M).evaluate(e, t);
2205
2206
  return t ? s === n : s.isEqual(n);
2206
2207
  }
2207
2208
  isEqual(e) {
2208
2209
  const t = new xe(e);
2209
- return t.left.isEqual(i(this, O)) && t.right.isEqual(i(this, M));
2210
+ return t.left.isEqual(i(this, A)) && t.right.isEqual(i(this, M));
2210
2211
  }
2211
2212
  pow(e) {
2212
- return i(this, O).pow(e), i(this, M).pow(e), this;
2213
+ return i(this, A).pow(e), i(this, M).pow(e), this;
2213
2214
  }
2214
2215
  reduce() {
2215
- return this.moveLeft(), i(this, O).reduce(), this.simplify(), i(this, O).monoms[0].coefficient.isNegative() && this.multiply(-1), this;
2216
+ return this.moveLeft(), i(this, A).reduce(), this.simplify(), i(this, A).monoms[0].coefficient.isNegative() && this.multiply(-1), this;
2216
2217
  }
2217
2218
  split() {
2218
- return [i(this, O).clone(), i(this, M).clone()];
2219
+ return [i(this, A).clone(), i(this, M).clone()];
2219
2220
  }
2220
2221
  subtract(e) {
2221
2222
  if (e instanceof xe)
2222
- return i(this, O).subtract(e.left), i(this, M).subtract(e.right), this;
2223
+ return i(this, A).subtract(e.left), i(this, M).subtract(e.right), this;
2223
2224
  if (typeof e == "string" && !xe.isEquationString(e))
2224
2225
  return this.subtract(new xe(e));
2225
- const t = new A(e);
2226
- return i(this, O).subtract(t), i(this, M).subtract(t), this;
2226
+ const t = new O(e);
2227
+ return i(this, A).subtract(t), i(this, M).subtract(t), this;
2227
2228
  }
2228
2229
  static isEquationString(e) {
2229
2230
  return e.includes("=") || e.includes("<") || e.includes(">") || e.includes("<=") || e.includes(">=");
@@ -2235,14 +2236,14 @@ const xe = class xe {
2235
2236
  // #endregion Properties and methods (26)
2236
2237
  // #region Getters And Setters (13)
2237
2238
  get display() {
2238
- return `${i(this, O).display}${this.signAsTex}${i(this, M).display}`;
2239
+ return `${i(this, A).display}${this.signAsTex}${i(this, M).display}`;
2239
2240
  }
2240
2241
  // Getter and setter
2241
2242
  get left() {
2242
- return i(this, O);
2243
+ return i(this, A);
2243
2244
  }
2244
2245
  set left(e) {
2245
- h(this, O, e);
2246
+ h(this, A, e);
2246
2247
  }
2247
2248
  get numberOfVars() {
2248
2249
  return this.variables.length;
@@ -2264,14 +2265,14 @@ const xe = class xe {
2264
2265
  return i(this, ne) === ">=" ? "\\geq" : i(this, ne) === "<=" ? "\\leq" : i(this, ne);
2265
2266
  }
2266
2267
  get tex() {
2267
- return `${i(this, O).tex}${this.signAsTex}${i(this, M).tex}`;
2268
+ return `${i(this, A).tex}${this.signAsTex}${i(this, M).tex}`;
2268
2269
  }
2269
2270
  get variables() {
2270
- return [...new Set(i(this, M).variables.concat(i(this, O).variables))];
2271
+ return [...new Set(i(this, M).variables.concat(i(this, A).variables))];
2271
2272
  }
2272
2273
  // #endregion Private methods (6)
2273
2274
  };
2274
- O = new WeakMap(), M = new WeakMap(), ne = new WeakMap(), St = new WeakMap(), _e = new WeakMap(), Pt = new WeakMap();
2275
+ A = new WeakMap(), M = new WeakMap(), ne = new WeakMap(), Bt = new WeakMap(), _e = new WeakMap(), St = new WeakMap();
2275
2276
  let H = xe;
2276
2277
  var N, je, ct, Jt;
2277
2278
  const me = class me {
@@ -2294,7 +2295,7 @@ const me = class me {
2294
2295
  }), this);
2295
2296
  }
2296
2297
  fromPolynom(e, t) {
2297
- return h(this, N, new A(e).factorize(t).map((s) => new fe(s))), this;
2298
+ return h(this, N, new O(e).factorize(t).map((s) => new fe(s))), this;
2298
2299
  }
2299
2300
  clone() {
2300
2301
  return new me(...i(this, N).map((e) => e.clone()));
@@ -2303,7 +2304,7 @@ const me = class me {
2303
2304
  let t = [this, ...e];
2304
2305
  const s = me.gcd(...t);
2305
2306
  t = t.map((r) => r.divide(s).reduce());
2306
- const n = new A("0");
2307
+ const n = new O("0");
2307
2308
  return t.forEach((r) => n.add(r.develop())), h(this, N, [
2308
2309
  ...s.factors,
2309
2310
  new fe(n)
@@ -2323,7 +2324,7 @@ const me = class me {
2323
2324
  return s !== void 0 && h(this, N, s.factors), this.add(...e);
2324
2325
  }
2325
2326
  develop() {
2326
- const e = new A("1");
2327
+ const e = new O("1");
2327
2328
  return i(this, N).forEach((t) => {
2328
2329
  e.multiply(t.develop());
2329
2330
  }), e;
@@ -2538,7 +2539,7 @@ const He = class He {
2538
2539
  const n = t.split("").splice(0, s - 1);
2539
2540
  return new He(
2540
2541
  ...e.map((r) => {
2541
- const l = new A(n.join(""), ...r);
2542
+ const l = new O(n.join(""), ...r);
2542
2543
  return new H(l, 0);
2543
2544
  })
2544
2545
  );
@@ -2662,7 +2663,7 @@ function Ki(...o) {
2662
2663
  ).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]))));
2663
2664
  }
2664
2665
  var Z, ze;
2665
- const Se = class Se {
2666
+ const Be = class Be {
2666
2667
  constructor(...e) {
2667
2668
  d(this, Z, []);
2668
2669
  d(this, ze, !1);
@@ -2789,7 +2790,7 @@ const Se = class Se {
2789
2790
  if (e.length === 0)
2790
2791
  throw new Error("Invalid value");
2791
2792
  if (e.length === 1) {
2792
- if (e[0] instanceof Se)
2793
+ if (e[0] instanceof Be)
2793
2794
  return e[0].clone();
2794
2795
  if (typeof e[0] == "string")
2795
2796
  return this.fromString(e[0]);
@@ -2797,7 +2798,7 @@ const Se = class Se {
2797
2798
  }
2798
2799
  if (e.length === 2) {
2799
2800
  const [t, s] = e;
2800
- if (t instanceof Se && s instanceof Se) {
2801
+ if (t instanceof Be && s instanceof Be) {
2801
2802
  if (t.dimension !== s.dimension)
2802
2803
  throw new Error("Vectors must have the same dimension");
2803
2804
  return h(this, Z, s.array.map((n, r) => n.clone().subtract(t.array[r]))), this;
@@ -2806,7 +2807,7 @@ const Se = class Se {
2806
2807
  return h(this, Z, e.map((t) => new c(t))), this;
2807
2808
  }
2808
2809
  clone() {
2809
- const e = new Se();
2810
+ const e = new Be();
2810
2811
  return e.array = this.copy(), e.asPoint = this.asPoint, e;
2811
2812
  }
2812
2813
  copy() {
@@ -2825,7 +2826,7 @@ const Se = class Se {
2825
2826
  cross(e) {
2826
2827
  if (this.dimension !== 3 || e.dimension !== 3)
2827
2828
  throw new Error("Cross product can only be determined in 3D");
2828
- return new Se(
2829
+ return new Be(
2829
2830
  this.y.clone().multiply(e.z).subtract(this.z.clone().multiply(e.y)),
2830
2831
  this.z.clone().multiply(e.x).subtract(this.x.clone().multiply(e.z)),
2831
2832
  this.x.clone().multiply(e.y).subtract(this.y.clone().multiply(e.x))
@@ -2838,7 +2839,7 @@ const Se = class Se {
2838
2839
  return this.array.every((e, t) => t === 0 ? e.isOne() : e.isZero());
2839
2840
  }
2840
2841
  distanceTo(e) {
2841
- const t = new Se(this, e);
2842
+ const t = new Be(this, e);
2842
2843
  return {
2843
2844
  value: t.norm,
2844
2845
  fraction: t.normSquare,
@@ -2847,7 +2848,7 @@ const Se = class Se {
2847
2848
  }
2848
2849
  };
2849
2850
  Z = new WeakMap(), ze = new WeakMap();
2850
- let x = Se;
2851
+ let x = Be;
2851
2852
  function vi(o = 0.5) {
2852
2853
  return Math.random() < o;
2853
2854
  }
@@ -2912,7 +2913,7 @@ class j extends x {
2912
2913
  return e.array = this.copy(), e.asPoint = !0, e;
2913
2914
  }
2914
2915
  }
2915
- var xi = /* @__PURE__ */ ((o) => (o.None = "none", o.Parallel = "parallel", o.Perpendicular = "perpendicular", o.Tangent = "tangent", o))(xi || {}), $e, S, P, U, re, Y, Ie, ve;
2916
+ var xi = /* @__PURE__ */ ((o) => (o.None = "none", o.Parallel = "parallel", o.Perpendicular = "perpendicular", o.Tangent = "tangent", o))(xi || {}), $e, B, S, U, re, Y, Ie, ve;
2916
2917
  const De = class De {
2917
2918
  /**
2918
2919
  * Value can be a mix of:
@@ -2922,8 +2923,8 @@ const De = class De {
2922
2923
  constructor(...e) {
2923
2924
  d(this, $e);
2924
2925
  // ax + by + c = 0
2926
+ d(this, B);
2925
2927
  d(this, S);
2926
- d(this, P);
2927
2928
  d(this, U);
2928
2929
  d(this, re);
2929
2930
  d(this, Y);
@@ -2950,7 +2951,7 @@ const De = class De {
2950
2951
  return this;
2951
2952
  if (e.length === 1) {
2952
2953
  if (e[0] instanceof De)
2953
- return e[0].clone();
2954
+ return this.fromCoefficient(e[0].a, e[0].b, e[0].c);
2954
2955
  if (e[0] instanceof H)
2955
2956
  return this.fromEquation(e[0]);
2956
2957
  if (typeof e[0] == "string")
@@ -2991,7 +2992,7 @@ const De = class De {
2991
2992
  e[2]
2992
2993
  );
2993
2994
  }
2994
- return console.log("Something wrong happened while creating the line"), this;
2995
+ return console.log("Something wrong happened while creating the line"), console.log(e), this;
2995
2996
  });
2996
2997
  a(this, "fromEquation", (e) => {
2997
2998
  e.reorder(!0);
@@ -3000,9 +3001,13 @@ const De = class De {
3000
3001
  return this;
3001
3002
  for (const s of ["x", "y"])
3002
3003
  t.has(s) && t.delete(s);
3003
- return t.size > 0 ? this : this.fromCoefficient(e.left.monomByLetter("x").coefficient, e.left.monomByLetter("y").coefficient, e.left.monomByDegree(0).coefficient);
3004
+ return t.size > 0 ? this : this.fromCoefficient(
3005
+ e.left.monomByLetter("x").coefficient,
3006
+ e.left.monomByLetter("y").coefficient,
3007
+ e.left.monomByDegree(0).coefficient
3008
+ );
3004
3009
  });
3005
- a(this, "fromCoefficient", (e, t, s) => (h(this, S, new c(e)), h(this, P, new c(t)), h(this, U, new c(s)), h(this, Y, new x(i(this, P).clone(), i(this, S).clone().opposite())), h(this, re, new x(new c().zero(), i(this, U).clone())), h(this, Ie, i(this, Y).clone().normal()), this));
3010
+ a(this, "fromCoefficient", (e, t, s) => (h(this, B, new c(e)), h(this, S, new c(t)), h(this, U, new c(s)), h(this, Y, new x(i(this, S).clone(), i(this, B).clone().opposite())), h(this, re, new x(new c().zero(), i(this, U).clone())), h(this, Ie, i(this, Y).clone().normal()), this));
3006
3011
  a(this, "fromPointAndDirection", (e, t) => (this.fromCoefficient(
3007
3012
  t.y,
3008
3013
  t.x.clone().opposite(),
@@ -3014,22 +3019,22 @@ const De = class De {
3014
3019
  e.x.clone().multiply(t.x).add(e.y.clone().multiply(t.y)).opposite()
3015
3020
  ));
3016
3021
  a(this, "fromPointAndLine", (e, t, s) => (s === void 0 && (s = "parallel"), s === "parallel" ? this.fromPointAndNormal(e, t.normal) : s === "perpendicular" ? this.fromPointAndNormal(e, t.director) : this));
3017
- a(this, "clone", () => (h(this, S, i(this, S).clone()), h(this, P, i(this, P).clone()), h(this, U, i(this, U).clone()), h(this, Y, i(this, Y).clone()), h(this, re, i(this, re).clone()), h(this, Ie, i(this, Ie).clone()), this));
3022
+ a(this, "clone", () => (h(this, B, i(this, B).clone()), h(this, S, i(this, S).clone()), h(this, U, i(this, U).clone()), h(this, Y, i(this, Y).clone()), h(this, re, i(this, re).clone()), h(this, Ie, i(this, Ie).clone()), this));
3018
3023
  // ------------------------------------------
3019
3024
  // Mathematical operations
3020
3025
  // ------------------------------------------
3021
- a(this, "isOnLine", (e) => i(this, S).clone().multiply(e.x).add(
3022
- i(this, P).clone().multiply(e.y)
3026
+ a(this, "isOnLine", (e) => i(this, B).clone().multiply(e.x).add(
3027
+ i(this, S).clone().multiply(e.y)
3023
3028
  ).add(i(this, U)).isZero());
3024
3029
  a(this, "isParallelTo", (e) => this.slope.isEqual(e.slope) && this.height.isNotEqual(e.height));
3025
3030
  a(this, "isSameAs", (e) => this.slope.isEqual(e.slope) && this.height.isEqual(e.height));
3026
3031
  a(this, "isPerpendicularTo", (e) => this.d.isNormalTo(e.d));
3027
3032
  a(this, "isVertical", () => this.slope.isInfinity());
3028
3033
  a(this, "simplify", () => {
3029
- const e = G.lcm(i(this, S).denominator, i(this, P).denominator, i(this, U).denominator), t = G.gcd(i(this, S).numerator, i(this, P).numerator, i(this, U).numerator);
3034
+ const e = G.lcm(i(this, B).denominator, i(this, S).denominator, i(this, U).denominator), t = G.gcd(i(this, B).numerator, i(this, S).numerator, i(this, U).numerator);
3030
3035
  return this.fromCoefficient(
3036
+ i(this, B).clone().multiply(e).divide(t),
3031
3037
  i(this, S).clone().multiply(e).divide(t),
3032
- i(this, P).clone().multiply(e).divide(t),
3033
3038
  i(this, U).clone().multiply(e).divide(t)
3034
3039
  ), this;
3035
3040
  });
@@ -3037,7 +3042,7 @@ const De = class De {
3037
3042
  a(this, "intersection", (e) => {
3038
3043
  const t = new x();
3039
3044
  let s = !1, n = !1;
3040
- return i(this, P).isZero() || e.b.isZero(), this.isParallelTo(e) ? (t.x = new c().invalid(), t.y = new c().invalid(), s = !0) : this.isSameAs(e) ? (t.x = new c().invalid(), t.y = new c().invalid(), n = !0) : (t.x = i(this, P).clone().multiply(e.c).subtract(i(this, U).clone().multiply(e.b)).divide(i(this, S).clone().multiply(e.b).subtract(i(this, P).clone().multiply(e.a))), t.y = i(this, S).clone().multiply(e.c).subtract(i(this, U).clone().multiply(e.a)).divide(i(this, P).clone().multiply(e.a).subtract(i(this, S).clone().multiply(e.b)))), {
3045
+ return i(this, S).isZero() || e.b.isZero(), this.isParallelTo(e) ? (t.x = new c().invalid(), t.y = new c().invalid(), s = !0) : this.isSameAs(e) ? (t.x = new c().invalid(), t.y = new c().invalid(), n = !0) : (t.x = i(this, S).clone().multiply(e.c).subtract(i(this, U).clone().multiply(e.b)).divide(i(this, B).clone().multiply(e.b).subtract(i(this, S).clone().multiply(e.a))), t.y = i(this, B).clone().multiply(e.c).subtract(i(this, U).clone().multiply(e.a)).divide(i(this, S).clone().multiply(e.a).subtract(i(this, B).clone().multiply(e.b)))), {
3041
3046
  point: t,
3042
3047
  hasIntersection: !(s || n),
3043
3048
  isParallel: s,
@@ -3052,21 +3057,21 @@ const De = class De {
3052
3057
  const t = this.getEquation().isolate("x"), s = new c(e);
3053
3058
  return t instanceof H ? t.right.evaluate({ y: s }) : new c().invalid();
3054
3059
  });
3055
- return h(this, S, new c().zero()), h(this, P, new c().zero()), h(this, U, new c().zero()), h(this, re, new x()), h(this, Y, new x()), h(this, Ie, new x()), h(this, $e, !0), e.length > 0 && this.parse(...e), this;
3060
+ return h(this, B, new c().zero()), h(this, S, new c().zero()), h(this, U, new c().zero()), h(this, re, new x()), h(this, Y, new x()), h(this, Ie, new x()), h(this, $e, !0), e.length > 0 && this.parse(...e), this;
3056
3061
  }
3057
3062
  get a() {
3058
- return i(this, S);
3063
+ return i(this, B);
3059
3064
  }
3060
3065
  // ------------------------------------------
3061
3066
  // Getter and setter
3062
3067
  set a(e) {
3063
- h(this, S, e);
3068
+ h(this, B, e);
3064
3069
  }
3065
3070
  get b() {
3066
- return i(this, P);
3071
+ return i(this, S);
3067
3072
  }
3068
3073
  set b(e) {
3069
- h(this, P, e);
3074
+ h(this, S, e);
3070
3075
  }
3071
3076
  get c() {
3072
3077
  return i(this, U);
@@ -3091,7 +3096,7 @@ const De = class De {
3091
3096
  }
3092
3097
  // ------------------------------------------
3093
3098
  getEquation() {
3094
- const e = new H(new A().parse("xy", i(this, S), i(this, P), i(this, U)), new A("0"));
3099
+ const e = new H(new O().parse("xy", i(this, B), i(this, S), i(this, U)), new O("0"));
3095
3100
  return i(this, $e) ? e.simplify() : e;
3096
3101
  }
3097
3102
  // get system(): { x: Equation, y: Equation } {
@@ -3128,18 +3133,18 @@ const De = class De {
3128
3133
  case "equation":
3129
3134
  return this.getEquation().reorder().tex;
3130
3135
  case "mxh":
3131
- return this.slope.isInfinity() ? "x=" + this.OA.x.tex : "y=" + new A().parse("x", this.slope, this.height).tex;
3136
+ return this.slope.isInfinity() ? "x=" + this.OA.x.tex : "y=" + new O().parse("x", this.slope, this.height).tex;
3132
3137
  case "parametric":
3133
3138
  case "system": {
3134
3139
  const t = i(this, Y).clone();
3135
3140
  return i(this, $e) && t.simplify(), e === "parametric" ? `${x.asTex("x", "y")} = ${x.asTex(i(this, re).x.tex, i(this, re).y.tex)} + k\\cdot ${x.asTex(t.x.tex, t.y.tex)}` : `\\left\\{\\begin{aligned}
3136
- x &= ${new A(i(this, re).x).add(new k(i(this, Y).x).multiply(new k("k"))).reorder("k", !0).tex}\\\\
3137
- y &= ${new A(i(this, re).y).add(new k(i(this, Y).y).multiply(new k("k"))).reorder("k", !0).tex}
3141
+ x &= ${new O(i(this, re).x).add(new k(i(this, Y).x).multiply(new k("k"))).reorder("k", !0).tex}\\\\
3142
+ y &= ${new O(i(this, re).y).add(new k(i(this, Y).y).multiply(new k("k"))).reorder("k", !0).tex}
3138
3143
  \\end{aligned}\\right.`;
3139
3144
  }
3140
3145
  default: {
3141
3146
  const t = this.getEquation();
3142
- return i(this, S).isNegative() && t.multiply(-1), t.tex;
3147
+ return i(this, B).isNegative() && t.multiply(-1), t.tex;
3143
3148
  }
3144
3149
  }
3145
3150
  }
@@ -3155,34 +3160,34 @@ const De = class De {
3155
3160
  case "equation":
3156
3161
  return this.getEquation().reorder().display;
3157
3162
  case "mxh":
3158
- return this.slope.isInfinity() ? "x=" + this.OA.x.display : "y=" + new A().parse("x", this.slope, this.height).display;
3163
+ return this.slope.isInfinity() ? "x=" + this.OA.x.display : "y=" + new O().parse("x", this.slope, this.height).display;
3159
3164
  case "parametric": {
3160
3165
  const t = i(this, Y).clone();
3161
3166
  return i(this, $e) && t.simplify(), `((x,y))=((${i(this, re).x.display},${i(this, re).y.display}))+k((${t.x.display},${t.y.display}))`;
3162
3167
  }
3163
3168
  default: {
3164
3169
  const t = this.getEquation();
3165
- return i(this, S).isNegative() && t.multiply(-1), t.display;
3170
+ return i(this, B).isNegative() && t.multiply(-1), t.display;
3166
3171
  }
3167
3172
  }
3168
3173
  }
3169
3174
  get normal() {
3170
- return new x(i(this, S), i(this, P));
3175
+ return new x(i(this, B), i(this, S));
3171
3176
  }
3172
3177
  get director() {
3173
3178
  return i(this, Y).clone();
3174
3179
  }
3175
3180
  get slope() {
3176
- return i(this, S).clone().opposite().divide(i(this, P));
3181
+ return i(this, B).clone().opposite().divide(i(this, S));
3177
3182
  }
3178
3183
  get height() {
3179
- return i(this, U).clone().opposite().divide(i(this, P));
3184
+ return i(this, U).clone().opposite().divide(i(this, S));
3180
3185
  }
3181
3186
  fromPoints(e, t) {
3182
3187
  return this.fromPointAndDirection(e, new x(e, t));
3183
3188
  }
3184
3189
  distanceTo(e) {
3185
- const t = e.x.clone().multiply(i(this, S)).add(e.y.clone().multiply(i(this, P))).add(i(this, U)).abs(), s = this.normal.normSquare;
3190
+ const t = e.x.clone().multiply(i(this, B)).add(e.y.clone().multiply(i(this, S))).add(i(this, U)).abs(), s = this.normal.normSquare;
3186
3191
  if (s.isZero())
3187
3192
  return {
3188
3193
  value: NaN,
@@ -3202,7 +3207,7 @@ const De = class De {
3202
3207
  }
3203
3208
  hitSegment(e, t) {
3204
3209
  const s = this.intersection(
3205
- new De(e, t)
3210
+ new De().fromPoints(e, t)
3206
3211
  );
3207
3212
  return s.hasIntersection ? s.point.x.value >= Math.min(e.x.value, t.x.value) && s.point.x.value <= Math.max(e.x.value, t.x.value) && s.point.y.value >= Math.min(e.y.value, t.y.value) && s.point.y.value <= Math.max(e.y.value, t.y.value) : !1;
3208
3213
  }
@@ -3212,19 +3217,19 @@ const De = class De {
3212
3217
  canonicalAsFloatCoefficient(e) {
3213
3218
  e === void 0 && (e = 2);
3214
3219
  let t = "";
3215
- return i(this, S).isZero() || (i(this, S).isOne() ? t = "x" : i(this, S).clone().opposite().isOne() ? t = "-x" : t = i(this, S).value.toFixed(e) + "x"), i(this, P).isZero() || (i(this, P).isPositive() && (t += "+"), t += i(this, P).value.toFixed(e) + "y"), i(this, U).isZero() || (i(this, U).isPositive() && (t += "+"), t += i(this, U).value.toFixed(e)), t + "=0";
3220
+ return i(this, B).isZero() || (i(this, B).isOne() ? t = "x" : i(this, B).clone().opposite().isOne() ? t = "-x" : t = i(this, B).value.toFixed(e) + "x"), i(this, S).isZero() || (i(this, S).isPositive() && (t += "+"), t += i(this, S).value.toFixed(e) + "y"), i(this, U).isZero() || (i(this, U).isPositive() && (t += "+"), t += i(this, U).value.toFixed(e)), t + "=0";
3216
3221
  }
3217
3222
  };
3218
- $e = new WeakMap(), S = new WeakMap(), P = new WeakMap(), U = new WeakMap(), re = new WeakMap(), Y = new WeakMap(), Ie = new WeakMap(), ve = new WeakMap(), // A line is defined as the canonical form
3223
+ $e = new WeakMap(), B = new WeakMap(), S = new WeakMap(), U = new WeakMap(), re = new WeakMap(), Y = new WeakMap(), Ie = new WeakMap(), ve = new WeakMap(), // A line is defined as the canonical form
3219
3224
  a(De, "PERPENDICULAR", "perpendicular"), a(De, "PARALLEL", "parallel");
3220
3225
  let D = De;
3221
- var oe, F, Oe, Lt, Dt, Vt, he, Ei, yt, Ni, Ti, Oi, ei;
3226
+ var oe, F, Ae, Lt, Dt, Vt, he, Ei, yt, Ni, Ti, Ai, ei;
3222
3227
  const Zt = class Zt {
3223
3228
  constructor(...e) {
3224
3229
  d(this, he);
3225
3230
  d(this, oe);
3226
3231
  d(this, F);
3227
- d(this, Oe);
3232
+ d(this, Ae);
3228
3233
  /**
3229
3234
  * Get the relative position between circle and line. It corresponds to the number of intersection.
3230
3235
  * @param {Line} L
@@ -3238,15 +3243,15 @@ const Zt = class Zt {
3238
3243
  });
3239
3244
  a(this, "lineIntersection", (e) => {
3240
3245
  const t = [];
3241
- if (i(this, Oe) === void 0)
3246
+ if (i(this, Ae) === void 0)
3242
3247
  return [];
3243
- const s = i(this, Oe).clone(), n = e.getEquation().clone().isolate("x"), r = e.getEquation().clone().isolate("y");
3248
+ const s = i(this, Ae).clone(), n = e.getEquation().clone().isolate("x"), r = e.getEquation().clone().isolate("y");
3244
3249
  return n instanceof H && r instanceof H && (s.replaceBy("y", r.right).simplify(), s.solve()), t;
3245
3250
  });
3246
3251
  a(this, "tangents", (e) => e instanceof c ? i(this, Vt).call(this, e) : this.isPointOnCircle(e) ? i(this, Lt).call(this, e) : i(this, oe) !== void 0 && i(this, oe).distanceTo(e).value > this.radius.value ? i(this, Dt).call(this, e) : (console.log("No tangents as the point is inside !"), []));
3247
3252
  a(this, "isPointOnCircle", (e) => {
3248
3253
  var t;
3249
- return ((t = i(this, Oe)) == null ? void 0 : t.test({ x: e.x, y: e.y })) ?? !1;
3254
+ return ((t = i(this, Ae)) == null ? void 0 : t.test({ x: e.x, y: e.y })) ?? !1;
3250
3255
  });
3251
3256
  a(this, "getPointsOnCircle", (e) => {
3252
3257
  const t = G.pythagoreanTripletsWithTarget(this.squareRadius.value, !0), s = [];
@@ -3265,7 +3270,7 @@ const Zt = class Zt {
3265
3270
  return [new D(e, t, xi.Perpendicular)];
3266
3271
  });
3267
3272
  d(this, Dt, (e) => {
3268
- const t = this.center.x.clone().subtract(e.x), s = this.center.y.clone().subtract(e.y), n = new A("x"), r = new A("x^2+1");
3273
+ const t = this.center.x.clone().subtract(e.x), s = this.center.y.clone().subtract(e.y), n = new O("x"), r = new O("x^2+1");
3269
3274
  return n.multiply(t).subtract(s).pow(2), r.multiply(this.squareRadius), new H(n, r).solve().map((f) => {
3270
3275
  let m;
3271
3276
  const g = new H("y", "x");
@@ -3285,9 +3290,9 @@ const Zt = class Zt {
3285
3290
  return i(this, F) ?? new c(0);
3286
3291
  }
3287
3292
  get cartesian() {
3288
- if (i(this, Oe) === void 0)
3293
+ if (i(this, Ae) === void 0)
3289
3294
  throw new Error("Cartesian equation not defined");
3290
- return i(this, Oe);
3295
+ return i(this, Ae);
3291
3296
  }
3292
3297
  get radius() {
3293
3298
  return i(this, F) === void 0 ? { tex: "", display: "", value: 0 } : i(this, F).isSquare() ? {
@@ -3322,7 +3327,7 @@ const Zt = class Zt {
3322
3327
  return t ? h(this, F, new c(e)) : h(this, F, new c(e).pow(2)), q(this, he, yt).call(this), this;
3323
3328
  }
3324
3329
  parse(...e) {
3325
- return q(this, he, Ei).call(this), typeof e[0] == "string" ? q(this, he, ei).call(this, new H(e[0])) : e[0] instanceof H ? q(this, he, ei).call(this, e[0]) : e[0] instanceof Zt ? q(this, he, Ni).call(this, e[0]) : e[0] instanceof j && e.length > 1 && (e[1] instanceof j ? e[2] instanceof j || q(this, he, Oi).call(this, e[0], e[1]) : (e[1] instanceof c || typeof e[1] == "number") && q(this, he, Ti).call(this, e[0], e[1], typeof e[2] == "boolean" ? e[2] : !1)), q(this, he, yt).call(this), this;
3330
+ return q(this, he, Ei).call(this), typeof e[0] == "string" ? q(this, he, ei).call(this, new H(e[0])) : e[0] instanceof H ? q(this, he, ei).call(this, e[0]) : e[0] instanceof Zt ? q(this, he, Ni).call(this, e[0]) : e[0] instanceof j && e.length > 1 && (e[1] instanceof j ? e[2] instanceof j || q(this, he, Ai).call(this, e[0], e[1]) : (e[1] instanceof c || typeof e[1] == "number") && q(this, he, Ti).call(this, e[0], e[1], typeof e[2] == "boolean" ? e[2] : !1)), q(this, he, yt).call(this), this;
3326
3331
  }
3327
3332
  // private _parseThroughtThreePoints(A: Point, B: Point, C: Point): this {
3328
3333
  // const T = new Triangle(A, B, C), mAB = T.remarquables.mediators.AB.clone(),
@@ -3331,18 +3336,18 @@ const Zt = class Zt {
3331
3336
  // return this
3332
3337
  // }
3333
3338
  };
3334
- oe = new WeakMap(), F = new WeakMap(), Oe = new WeakMap(), Lt = new WeakMap(), Dt = new WeakMap(), Vt = new WeakMap(), he = new WeakSet(), Ei = function() {
3335
- return h(this, oe, void 0), h(this, F, void 0), h(this, Oe, void 0), this;
3339
+ oe = new WeakMap(), F = new WeakMap(), Ae = new WeakMap(), Lt = new WeakMap(), Dt = new WeakMap(), Vt = new WeakMap(), he = new WeakSet(), Ei = function() {
3340
+ return h(this, oe, void 0), h(this, F, void 0), h(this, Ae, void 0), this;
3336
3341
  }, yt = function() {
3337
- h(this, Oe, new H(
3338
- new A(`(x-(${this.center.x.display}))^2+(y-(${this.center.y.display}))^2`),
3339
- new A(this.squareRadius.display)
3342
+ h(this, Ae, new H(
3343
+ new O(`(x-(${this.center.x.display}))^2+(y-(${this.center.y.display}))^2`),
3344
+ new O(this.squareRadius.display)
3340
3345
  ).moveLeft());
3341
3346
  }, Ni = function(e) {
3342
3347
  return h(this, oe, e.center.clone()), h(this, F, e.squareRadius.clone()), q(this, he, yt).call(this), this;
3343
3348
  }, Ti = function(e, t, s) {
3344
3349
  return h(this, oe, e.clone()), s ? h(this, F, new c(t)) : h(this, F, new c(t).pow(2)), this;
3345
- }, Oi = function(e, t) {
3350
+ }, Ai = function(e, t) {
3346
3351
  return h(this, oe, e.clone()), h(this, F, new x(i(this, oe), t).normSquare), this;
3347
3352
  }, ei = function(e) {
3348
3353
  if (e.moveLeft(), e.degree("x").value === 2 && e.degree("y").value === 2) {
@@ -3353,14 +3358,14 @@ oe = new WeakMap(), F = new WeakMap(), Oe = new WeakMap(), Lt = new WeakMap(), D
3353
3358
  return this;
3354
3359
  };
3355
3360
  let vt = Zt;
3356
- var Q, _, ee, et, Ae, ut, Ft, ft, Be, jt, tt;
3361
+ var Q, _, ee, et, Oe, ut, Ft, ft, Pe, jt, tt;
3357
3362
  const Ut = class Ut {
3358
3363
  constructor(...e) {
3359
3364
  d(this, Q);
3360
3365
  d(this, _);
3361
3366
  d(this, ee);
3362
3367
  d(this, et);
3363
- d(this, Ae);
3368
+ d(this, Oe);
3364
3369
  d(this, ut);
3365
3370
  // ------------------------------------------
3366
3371
  // Creation / parsing functions
@@ -3384,7 +3389,9 @@ const Ut = class Ut {
3384
3389
  );
3385
3390
  } else if (e.length === 3) {
3386
3391
  if (e.every((t) => typeof t == "string"))
3387
- return this.parse(...e.map((t) => new D(t)));
3392
+ return this.parse(
3393
+ ...e.map((t) => new D(t))
3394
+ );
3388
3395
  if (e.every((t) => t instanceof D)) {
3389
3396
  const t = e[0].clone(), s = e[1].clone(), n = e[2].clone();
3390
3397
  h(this, et, { AB: t, BC: s, AC: n });
@@ -3425,7 +3432,7 @@ const Ut = class Ut {
3425
3432
  * Generate the Line object for the three segments of the triangle
3426
3433
  */
3427
3434
  d(this, Ft, () => {
3428
- h(this, Ae, {
3435
+ h(this, Oe, {
3429
3436
  AB: new j().middleOf(i(this, Q), i(this, _)),
3430
3437
  AC: new j().middleOf(i(this, Q), i(this, ee)),
3431
3438
  BC: new j().middleOf(i(this, _), i(this, ee))
@@ -3451,25 +3458,25 @@ const Ut = class Ut {
3451
3458
  * @param ptName1
3452
3459
  * @param ptName2
3453
3460
  */
3454
- d(this, Be, (e, t) => new x(
3461
+ d(this, Pe, (e, t) => new x(
3455
3462
  i(this, ft).call(this, e),
3456
3463
  i(this, ft).call(this, t)
3457
3464
  ));
3458
3465
  d(this, jt, () => {
3459
3466
  const e = {
3460
- A: new D(i(this, Q), i(this, Ae).BC),
3461
- B: new D(i(this, _), i(this, Ae).AC),
3462
- C: new D(i(this, ee), i(this, Ae).AB),
3467
+ A: new D().fromPoints(i(this, Q), i(this, Oe).BC),
3468
+ B: new D().fromPoints(i(this, _), i(this, Oe).AC),
3469
+ C: new D().fromPoints(i(this, ee), i(this, Oe).AB),
3463
3470
  intersection: null
3464
3471
  }, t = {
3465
- AB: new D(i(this, Ae).AB, new x(i(this, Q), i(this, _)).normal()),
3466
- AC: new D(i(this, Ae).AC, new x(i(this, Q), i(this, ee)).normal()),
3467
- BC: new D(i(this, Ae).BC, new x(i(this, _), i(this, ee)).normal()),
3472
+ AB: new D().fromPointAndNormal(i(this, Oe).AB, new x(i(this, Q), i(this, _)).normal()),
3473
+ AC: new D().fromPointAndNormal(i(this, Oe).AC, new x(i(this, Q), i(this, ee)).normal()),
3474
+ BC: new D().fromPointAndNormal(i(this, Oe).BC, new x(i(this, _), i(this, ee)).normal()),
3468
3475
  intersection: null
3469
3476
  }, s = {
3470
- A: new D(i(this, Q), new x(i(this, _), i(this, ee)).normal()),
3471
- B: new D(i(this, _), new x(i(this, Q), i(this, ee)).normal()),
3472
- C: new D(i(this, ee), new x(i(this, Q), i(this, _)).normal()),
3477
+ A: new D().fromPointAndNormal(i(this, Q), new x(i(this, _), i(this, ee)).normal()),
3478
+ B: new D().fromPointAndNormal(i(this, _), new x(i(this, Q), i(this, ee)).normal()),
3479
+ C: new D().fromPointAndNormal(i(this, ee), new x(i(this, Q), i(this, _)).normal()),
3473
3480
  intersection: null
3474
3481
  }, n = i(this, tt).call(this, "A"), r = i(this, tt).call(this, "B"), l = i(this, tt).call(this, "C"), u = {
3475
3482
  A: n.internal,
@@ -3513,22 +3520,22 @@ const Ut = class Ut {
3513
3520
  return i(this, ee);
3514
3521
  }
3515
3522
  get AB() {
3516
- return i(this, Be).call(this, "A", "B");
3523
+ return i(this, Pe).call(this, "A", "B");
3517
3524
  }
3518
3525
  get BA() {
3519
- return i(this, Be).call(this, "B", "A");
3526
+ return i(this, Pe).call(this, "B", "A");
3520
3527
  }
3521
3528
  get BC() {
3522
- return i(this, Be).call(this, "B", "C");
3529
+ return i(this, Pe).call(this, "B", "C");
3523
3530
  }
3524
3531
  get CB() {
3525
- return i(this, Be).call(this, "C", "B");
3532
+ return i(this, Pe).call(this, "C", "B");
3526
3533
  }
3527
3534
  get AC() {
3528
- return i(this, Be).call(this, "A", "C");
3535
+ return i(this, Pe).call(this, "A", "C");
3529
3536
  }
3530
3537
  get CA() {
3531
- return i(this, Be).call(this, "C", "A");
3538
+ return i(this, Pe).call(this, "C", "A");
3532
3539
  }
3533
3540
  get isRectangle() {
3534
3541
  return !!(this.AB.isNormalTo(this.BC) || this.AB.isNormalTo(this.AC) || this.BC.isNormalTo(this.AC));
@@ -3546,7 +3553,7 @@ const Ut = class Ut {
3546
3553
  return i(this, ut);
3547
3554
  }
3548
3555
  };
3549
- Q = new WeakMap(), _ = new WeakMap(), ee = new WeakMap(), et = new WeakMap(), Ae = new WeakMap(), ut = new WeakMap(), Ft = new WeakMap(), ft = new WeakMap(), Be = new WeakMap(), jt = new WeakMap(), tt = new WeakMap();
3556
+ Q = new WeakMap(), _ = new WeakMap(), ee = new WeakMap(), et = new WeakMap(), Oe = new WeakMap(), ut = new WeakMap(), Ft = new WeakMap(), ft = new WeakMap(), Pe = new WeakMap(), jt = new WeakMap(), tt = new WeakMap();
3550
3557
  let ti = Ut;
3551
3558
  var R, W;
3552
3559
  const ot = class ot {
@@ -3622,11 +3629,11 @@ const ot = class ot {
3622
3629
  return {
3623
3630
  parametric: `${x.asTex("x", "y", "z")} = ${x.asTex(i(this, R).x.tex, i(this, R).y.tex, i(this, R).z.tex)} + k\\cdot ${x.asTex(i(this, W).x.tex, i(this, W).y.tex, i(this, W).z.tex)}`,
3624
3631
  system: `\\left\\{\\begin{aligned}
3625
- x &= ${new A(i(this, R).x).add(new k(i(this, W).x).multiply(new k("k"))).reorder("k", !0).tex}\\\\
3626
- y &= ${new A(i(this, R).y).add(new k(i(this, W).y).multiply(new k("k"))).reorder("k", !0).tex}\\\\
3627
- z &= ${new A(i(this, R).z).add(new k(i(this, W).z).multiply(new k("k"))).reorder("k", !0).tex}
3632
+ x &= ${new O(i(this, R).x).add(new k(i(this, W).x).multiply(new k("k"))).reorder("k", !0).tex}\\\\
3633
+ y &= ${new O(i(this, R).y).add(new k(i(this, W).y).multiply(new k("k"))).reorder("k", !0).tex}\\\\
3634
+ z &= ${new O(i(this, R).z).add(new k(i(this, W).z).multiply(new k("k"))).reorder("k", !0).tex}
3628
3635
  \\end{aligned}\\right.`,
3629
- cartesian: `\\frac{ ${new A("x", 1, i(this, R).x.clone().opposite()).tex} }{ ${this.direction.x.tex} } = \\frac{ ${new A("y", 1, i(this, R).y.clone().opposite()).tex} }{ ${this.direction.y.tex} } = \\frac{ ${new A("z", 1, i(this, R).z.clone().opposite()).tex} }{ ${this.direction.z.tex} }`
3636
+ cartesian: `\\frac{ ${new O("x", 1, i(this, R).x.clone().opposite()).tex} }{ ${this.direction.x.tex} } = \\frac{ ${new O("y", 1, i(this, R).y.clone().opposite()).tex} }{ ${this.direction.y.tex} } = \\frac{ ${new O("z", 1, i(this, R).z.clone().opposite()).tex} }{ ${this.direction.z.tex} }`
3630
3637
  };
3631
3638
  }
3632
3639
  get display() {
@@ -3691,8 +3698,8 @@ const ai = class ai {
3691
3698
  }
3692
3699
  get tex() {
3693
3700
  return new H(
3694
- new A("xyz", this.a, this.b, this.c, this.d),
3695
- new A(0)
3701
+ new O("xyz", this.a, this.b, this.c, this.d),
3702
+ new O(0)
3696
3703
  ).reduce().tex;
3697
3704
  }
3698
3705
  parse(e) {
@@ -3796,7 +3803,7 @@ function xt(o) {
3796
3803
  }
3797
3804
  return e.reduced ? t.reduce() : t;
3798
3805
  }
3799
- function Ai(o) {
3806
+ function Oi(o) {
3800
3807
  const e = Object.assign(
3801
3808
  {
3802
3809
  letters: "x",
@@ -3836,10 +3843,10 @@ function qi(o) {
3836
3843
  const e = Object.assign(
3837
3844
  ts,
3838
3845
  o
3839
- ), t = new A().empty();
3846
+ ), t = new O().empty();
3840
3847
  let s;
3841
3848
  for (let n = e.degree; n >= 0; n--)
3842
- s = Ai({
3849
+ s = Oi({
3843
3850
  letters: e.letters,
3844
3851
  degree: n,
3845
3852
  fraction: e.fraction,
@@ -3872,7 +3879,7 @@ function is(o) {
3872
3879
  }
3873
3880
  },
3874
3881
  o
3875
- ), t = new A().one();
3882
+ ), t = new O().one();
3876
3883
  for (let s = 0; s < e.degree; s++) {
3877
3884
  const n = qi({
3878
3885
  degree: 1,
@@ -3949,7 +3956,7 @@ function rs(o) {
3949
3956
  const os = {
3950
3957
  equation: (o) => is(o),
3951
3958
  polynom: (o) => qi(o),
3952
- monom: (o) => Ai(o),
3959
+ monom: (o) => Oi(o),
3953
3960
  fraction: (o) => xt(o),
3954
3961
  number: (o, e, t) => de(o, e, t),
3955
3962
  numberSym: (o, e) => X(o, e),
@@ -4119,7 +4126,7 @@ const as = {
4119
4126
  Fraction: c,
4120
4127
  Root: pt,
4121
4128
  Monom: k,
4122
- Polynom: A,
4129
+ Polynom: O,
4123
4130
  Equation: H,
4124
4131
  Matrix: es,
4125
4132
  LinearSystem: _t,
@@ -4146,7 +4153,7 @@ export {
4146
4153
  ii as Plane3,
4147
4154
  j as Point,
4148
4155
  Kt as PolyFactor,
4149
- A as Polynom,
4156
+ O as Polynom,
4150
4157
  ti as Triangle,
4151
4158
  x as Vector,
4152
4159
  cs as default
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pimath",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "A math library for teacher :)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1 +1 @@
1
- {"version":3,"file":"polynom.d.ts","sourceRoot":"","sources":["../../src/algebra/polynom.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAC3I,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AAGnD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAI/B,MAAM,MAAM,kBAAkB,GAAG,UAAU,CAAC,OAAO,CAAC,GAAG,KAAK,CAAA;AAM5D,MAAM,WAAW,UAAU;IAGvB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAA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AI,MAAM,CAEvB;IAED,IAAW,SAAS,IAAI,MAAM,EAAE,CAU/B;IAED,IAAW,MAAM,IAAI,SAAS,EAAE,CAE/B;CAsZJ"}
@@ -58,7 +58,7 @@ export declare class Line implements IPiMathObject<Line> {
58
58
  * @param {any} values
59
59
  * @returns {Line}
60
60
  */
61
- parse: (...values: unknown[]) => Line;
61
+ parse: (...values: unknown[]) => this;
62
62
  fromPoints(pt1: Point, pt2: Point): this;
63
63
  fromEquation: (equ: Equation) => this;
64
64
  fromCoefficient: (a: InputValue<Fraction>, b: InputValue<Fraction>, c: InputValue<Fraction>) => this;
@@ -84,7 +84,7 @@ export declare class Line implements IPiMathObject<Line> {
84
84
  fraction: Fraction;
85
85
  tex: string;
86
86
  };
87
- hitSegment(A: Vector, B: Vector): boolean;
87
+ hitSegment(A: Point, B: Point): boolean;
88
88
  getValueAtX: (value: Fraction | number) => Fraction;
89
89
  getValueAtY: (value: Fraction | number) => Fraction;
90
90
  canonicalAsFloatCoefficient(decimals?: number): string;
@@ -1 +1 @@
1
- {"version":3,"file":"line.d.ts","sourceRoot":"","sources":["../../src/geometry/line.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAG9C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAEpE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE/B,oBAAY,aAAa;IACrB,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,aAAa,kBAAkB;IAC/B,OAAO,YAAY;CACtB;AAED,MAAM,WAAW,UAAU;IACvB,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAA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