pimath 0.0.13 → 0.0.17

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.
Files changed (123) hide show
  1. package/dev/index.html +9 -3
  2. package/dev/pi.js +364 -229
  3. package/dev/pi.js.map +1 -1
  4. package/dist/pi.js +1 -1
  5. package/dist/pi.js.map +1 -1
  6. package/docs/assets/search.js +1 -1
  7. package/docs/classes/algebra.Algebra.Equation.html +26 -0
  8. package/docs/classes/algebra.Algebra.LinearSystem.html +1 -0
  9. package/docs/classes/algebra.Algebra.LogicalSet.html +3 -0
  10. package/docs/classes/algebra.Algebra.Monom.html +36 -36
  11. package/docs/classes/algebra.Algebra.Polynom.html +11 -11
  12. package/docs/classes/algebra.Algebra.Rational.html +2 -0
  13. package/docs/classes/algebra.Equation.html +9 -9
  14. package/docs/classes/algebra.LinearSystem.html +1 -1
  15. package/docs/classes/algebra.Logicalset.html +2 -2
  16. package/docs/classes/algebra.Monom.html +36 -36
  17. package/docs/classes/algebra.Polynom.html +12 -12
  18. package/docs/classes/algebra.Rational.html +2 -2
  19. package/docs/classes/coefficients.Fraction.html +4 -4
  20. package/docs/classes/coefficients.Nthroot.html +1 -1
  21. package/docs/classes/geometry.Circle.html +1 -1
  22. package/docs/classes/geometry.Geometry.Circle.html +1 -0
  23. package/docs/classes/geometry.Geometry.Line.html +1 -0
  24. package/docs/classes/geometry.Geometry.Point.html +1 -0
  25. package/docs/classes/geometry.Geometry.Triangle.html +9 -0
  26. package/docs/classes/geometry.Geometry.Vector.html +1 -0
  27. package/docs/classes/geometry.Line.html +1 -1
  28. package/docs/classes/geometry.Point.html +1 -1
  29. package/docs/classes/geometry.Triangle.html +6 -6
  30. package/docs/classes/geometry.Vector.html +1 -1
  31. package/docs/classes/numeric.Numeric.html +5 -5
  32. package/docs/classes/shutingyard.Shutingyard.html +5 -5
  33. package/docs/interfaces/geometry.remarquableLines.html +1 -1
  34. package/docs/modules/algebra.Algebra.html +1 -1
  35. package/docs/modules/geometry.Geometry.html +1 -0
  36. package/docs/modules/geometry.html +1 -1
  37. package/docs/modules/random.Random.html +1 -1
  38. package/docs/modules/random.html +1 -1
  39. package/esm/main.js +24 -22
  40. package/esm/main.js.map +1 -1
  41. package/esm/maths/algebra/equation.d.ts +2 -1
  42. package/esm/maths/algebra/equation.js +29 -25
  43. package/esm/maths/algebra/equation.js.map +1 -1
  44. package/esm/maths/algebra/index.d.ts +0 -8
  45. package/esm/maths/algebra/index.js +18 -17
  46. package/esm/maths/algebra/index.js.map +1 -1
  47. package/esm/maths/algebra/linearSystem.d.ts +1 -1
  48. package/esm/maths/algebra/linearSystem.js +19 -15
  49. package/esm/maths/algebra/linearSystem.js.map +1 -1
  50. package/esm/maths/algebra/logicalset.js +7 -3
  51. package/esm/maths/algebra/logicalset.js.map +1 -1
  52. package/esm/maths/algebra/monom.d.ts +14 -17
  53. package/esm/maths/algebra/monom.js +164 -75
  54. package/esm/maths/algebra/monom.js.map +1 -1
  55. package/esm/maths/algebra/polynom.d.ts +6 -24
  56. package/esm/maths/algebra/polynom.js +57 -206
  57. package/esm/maths/algebra/polynom.js.map +1 -1
  58. package/esm/maths/algebra/rational.js +15 -10
  59. package/esm/maths/algebra/rational.js.map +1 -1
  60. package/esm/maths/coefficients/fraction.d.ts +20 -10
  61. package/esm/maths/coefficients/fraction.js +83 -15
  62. package/esm/maths/coefficients/fraction.js.map +1 -1
  63. package/esm/maths/coefficients/index.js +14 -2
  64. package/esm/maths/coefficients/index.js.map +1 -1
  65. package/esm/maths/coefficients/nthroot.js +5 -1
  66. package/esm/maths/coefficients/nthroot.js.map +1 -1
  67. package/esm/maths/geometry/circle.js +12 -8
  68. package/esm/maths/geometry/circle.js.map +1 -1
  69. package/esm/maths/geometry/index.js +17 -5
  70. package/esm/maths/geometry/index.js.map +1 -1
  71. package/esm/maths/geometry/line.js +26 -22
  72. package/esm/maths/geometry/line.js.map +1 -1
  73. package/esm/maths/geometry/point.js +16 -12
  74. package/esm/maths/geometry/point.js.map +1 -1
  75. package/esm/maths/geometry/triangle.js +31 -27
  76. package/esm/maths/geometry/triangle.js.map +1 -1
  77. package/esm/maths/geometry/vector.js +21 -17
  78. package/esm/maths/geometry/vector.js.map +1 -1
  79. package/esm/maths/numeric.js +5 -1
  80. package/esm/maths/numeric.js.map +1 -1
  81. package/esm/maths/random/index.d.ts +3 -1
  82. package/esm/maths/random/index.js +32 -14
  83. package/esm/maths/random/index.js.map +1 -1
  84. package/esm/maths/random/randomCore.js +5 -1
  85. package/esm/maths/random/randomCore.js.map +1 -1
  86. package/esm/maths/random/rndFraction.d.ts +9 -0
  87. package/esm/maths/random/rndFraction.js +30 -0
  88. package/esm/maths/random/rndFraction.js.map +1 -0
  89. package/esm/maths/random/rndHelpers.js +5 -1
  90. package/esm/maths/random/rndHelpers.js.map +1 -1
  91. package/esm/maths/random/rndMonom.d.ts +2 -2
  92. package/esm/maths/random/rndMonom.js +15 -8
  93. package/esm/maths/random/rndMonom.js.map +1 -1
  94. package/esm/maths/random/rndPolynom.d.ts +1 -1
  95. package/esm/maths/random/rndPolynom.js +22 -10
  96. package/esm/maths/random/rndPolynom.js.map +1 -1
  97. package/esm/maths/random/rndTypes.d.ts +5 -0
  98. package/esm/maths/random/rndTypes.js +2 -1
  99. package/esm/maths/shutingyard.js +5 -1
  100. package/esm/maths/shutingyard.js.map +1 -1
  101. package/package.json +5 -5
  102. package/src/maths/algebra/equation.ts +6 -5
  103. package/src/maths/algebra/index.ts +1 -9
  104. package/src/maths/algebra/linearSystem.ts +3 -3
  105. package/src/maths/algebra/monom.ts +759 -622
  106. package/src/maths/algebra/monom_bck.backup +746 -0
  107. package/src/maths/algebra/polynom.ts +980 -1170
  108. package/src/maths/algebra/rational.ts +6 -6
  109. package/src/maths/coefficients/fraction.ts +98 -27
  110. package/src/maths/geometry/index.ts +1 -1
  111. package/src/maths/geometry/line.ts +1 -1
  112. package/src/maths/random/index.ts +9 -3
  113. package/src/maths/random/rndFraction.ts +37 -0
  114. package/src/maths/random/rndMonom.ts +6 -3
  115. package/src/maths/random/rndPolynom.ts +15 -5
  116. package/src/maths/random/rndTypes.ts +5 -0
  117. package/src/maths/shutingyard.ts +2 -0
  118. package/tests/algebra/monom.test.ts +29 -8
  119. package/tests/algebra/polynom.test.ts +13 -22
  120. package/tests/coefficients/fraction.test.ts +35 -38
  121. package/tests/shutingyard.test.ts +0 -1
  122. package/tsconfig.json +1 -1
  123. package/tsconfig.testing.json +28 -0
package/dev/pi.js CHANGED
@@ -10,12 +10,11 @@
10
10
 
11
11
  __webpack_require__.r(__webpack_exports__);
12
12
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13
- /* harmony export */ "default": () => (/* binding */ Equation)
13
+ /* harmony export */ "Equation": () => (/* binding */ Equation)
14
14
  /* harmony export */ });
15
15
  /* harmony import */ var _polynom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./polynom */ "./src/maths/algebra/polynom.ts");
16
16
  /* harmony import */ var _numeric__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../numeric */ "./src/maths/numeric.ts");
17
- /* harmony import */ var _coefficients_fraction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../coefficients/fraction */ "./src/maths/coefficients/fraction.ts");
18
- /* harmony import */ var _coefficients_nthroot__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../coefficients/nthroot */ "./src/maths/coefficients/nthroot.ts");
17
+ /* harmony import */ var _coefficients__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../coefficients */ "./src/maths/coefficients/index.ts");
19
18
 
20
19
 
21
20
 
@@ -29,8 +28,8 @@ class Equation {
29
28
  _varnothing = '\\varnothing';
30
29
  _real = '\\mathbb{R}';
31
30
  constructor(...equations) {
32
- this._left = new _polynom__WEBPACK_IMPORTED_MODULE_0__["default"]().zero();
33
- this._right = new _polynom__WEBPACK_IMPORTED_MODULE_0__["default"]().zero();
31
+ this._left = new _polynom__WEBPACK_IMPORTED_MODULE_0__.Polynom().zero();
32
+ this._right = new _polynom__WEBPACK_IMPORTED_MODULE_0__.Polynom().zero();
34
33
  this._sign = '=';
35
34
  if (equations.length === 1) {
36
35
  if (equations[0].isEquation === true) {
@@ -41,8 +40,8 @@ class Equation {
41
40
  }
42
41
  }
43
42
  else if (equations.length === 2) {
44
- this.left = equations[0].isPolynom ? equations[0].clone() : new _polynom__WEBPACK_IMPORTED_MODULE_0__["default"](equations[0]);
45
- this.right = equations[1].isPolynom ? equations[1].clone() : new _polynom__WEBPACK_IMPORTED_MODULE_0__["default"](equations[1]);
43
+ this.left = equations[0].isPolynom ? equations[0].clone() : new _polynom__WEBPACK_IMPORTED_MODULE_0__.Polynom(equations[0]);
44
+ this.right = equations[1].isPolynom ? equations[1].clone() : new _polynom__WEBPACK_IMPORTED_MODULE_0__.Polynom(equations[1]);
46
45
  }
47
46
  else {
48
47
  return this;
@@ -124,7 +123,7 @@ class Equation {
124
123
  return;
125
124
  }
126
125
  pStr = equationString.split(strSign);
127
- return this.create(new _polynom__WEBPACK_IMPORTED_MODULE_0__["default"](pStr[0]), new _polynom__WEBPACK_IMPORTED_MODULE_0__["default"](pStr[1]), this._formatSign(strSign));
126
+ return this.create(new _polynom__WEBPACK_IMPORTED_MODULE_0__.Polynom(pStr[0]), new _polynom__WEBPACK_IMPORTED_MODULE_0__.Polynom(pStr[1]), this._formatSign(strSign));
128
127
  };
129
128
  _findSign = (equationString) => {
130
129
  let strSign = '';
@@ -225,7 +224,7 @@ class Equation {
225
224
  this._randomizeDefaults = value;
226
225
  }
227
226
  randomize = (opts, sign) => {
228
- return new Equation().create(new _polynom__WEBPACK_IMPORTED_MODULE_0__["default"](), new _polynom__WEBPACK_IMPORTED_MODULE_0__["default"](), sign);
227
+ return new Equation().create(new _polynom__WEBPACK_IMPORTED_MODULE_0__.Polynom(), new _polynom__WEBPACK_IMPORTED_MODULE_0__.Polynom(), sign);
229
228
  };
230
229
  moveLeft = () => {
231
230
  this._left = this._left.clone().subtract(this._right);
@@ -251,8 +250,8 @@ class Equation {
251
250
  return this;
252
251
  };
253
252
  simplify = () => {
254
- this.multiply(_numeric__WEBPACK_IMPORTED_MODULE_1__["default"].lcm(...this._left.getDenominators(), ...this._right.getDenominators()));
255
- this.divide(_numeric__WEBPACK_IMPORTED_MODULE_1__["default"].gcd(...this._left.getNumerators(), ...this._right.getNumerators()));
253
+ this.multiply(_numeric__WEBPACK_IMPORTED_MODULE_1__.Numeric.lcm(...this._left.getDenominators(), ...this._right.getDenominators()));
254
+ this.divide(_numeric__WEBPACK_IMPORTED_MODULE_1__.Numeric.gcd(...this._left.getNumerators(), ...this._right.getNumerators()));
256
255
  return this;
257
256
  };
258
257
  isolate = (letter) => {
@@ -286,7 +285,7 @@ class Equation {
286
285
  return this;
287
286
  };
288
287
  multiply = (value) => {
289
- let F = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_2__["default"](value);
288
+ let F = new _coefficients__WEBPACK_IMPORTED_MODULE_2__.Fraction(value);
290
289
  this._left.multiply(F);
291
290
  this._right.multiply(F);
292
291
  if (this._sign !== '=' && F.sign() === -1) {
@@ -295,7 +294,7 @@ class Equation {
295
294
  return this;
296
295
  };
297
296
  divide = (value) => {
298
- let F = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_2__["default"](value);
297
+ let F = new _coefficients__WEBPACK_IMPORTED_MODULE_2__.Fraction(value);
299
298
  if (F.isZero()) {
300
299
  return this;
301
300
  }
@@ -391,7 +390,7 @@ class Equation {
391
390
  return this._solutions;
392
391
  };
393
392
  _solveDegree2 = (letter) => {
394
- let aF = this._polynom.monomByDegree(2, letter).coefficient, bF = this._polynom.monomByDegree(1, letter).coefficient, cF = this._polynom.monomByDegree(0, letter).coefficient, delta, nthDelta, lcm = _numeric__WEBPACK_IMPORTED_MODULE_1__["default"].lcm(aF.denominator, bF.denominator, cF.denominator), a = aF.multiply(lcm).value, b = bF.multiply(lcm).value, c = cF.multiply(lcm).value, realX1, realX2, sX1, sX2;
393
+ let aF = this._polynom.monomByDegree(2, letter).coefficient, bF = this._polynom.monomByDegree(1, letter).coefficient, cF = this._polynom.monomByDegree(0, letter).coefficient, delta, nthDelta, lcm = _numeric__WEBPACK_IMPORTED_MODULE_1__.Numeric.lcm(aF.denominator, bF.denominator, cF.denominator), a = aF.multiply(lcm).value, b = bF.multiply(lcm).value, c = cF.multiply(lcm).value, realX1, realX2, sX1, sX2;
395
394
  delta = b * b - 4 * a * c;
396
395
  if (delta > 0) {
397
396
  realX1 = (-b - Math.sqrt(delta)) / (2 * a);
@@ -403,9 +402,9 @@ class Equation {
403
402
  ];
404
403
  }
405
404
  else {
406
- nthDelta = new _coefficients_nthroot__WEBPACK_IMPORTED_MODULE_3__["default"]().parse(delta).reduce();
405
+ nthDelta = new _coefficients__WEBPACK_IMPORTED_MODULE_2__.Nthroot().parse(delta).reduce();
407
406
  if (nthDelta.hasRadical()) {
408
- let gcd = _numeric__WEBPACK_IMPORTED_MODULE_1__["default"].gcd(b, 2 * a, nthDelta.coefficient);
407
+ let gcd = _numeric__WEBPACK_IMPORTED_MODULE_1__.Numeric.gcd(b, 2 * a, nthDelta.coefficient);
409
408
  nthDelta.coefficient = nthDelta.coefficient / gcd;
410
409
  if (b !== 0) {
411
410
  if (2 * a / gcd === 1) {
@@ -438,14 +437,14 @@ class Equation {
438
437
  }
439
438
  else {
440
439
  this._solutions = [
441
- new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_2__["default"](-b - nthDelta.coefficient, 2 * a).reduce().dfrac,
442
- new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_2__["default"](-b + nthDelta.coefficient, 2 * a).reduce().dfrac
440
+ new _coefficients__WEBPACK_IMPORTED_MODULE_2__.Fraction(-b - nthDelta.coefficient, 2 * a).reduce().dfrac,
441
+ new _coefficients__WEBPACK_IMPORTED_MODULE_2__.Fraction(-b + nthDelta.coefficient, 2 * a).reduce().dfrac
443
442
  ];
444
443
  }
445
444
  }
446
445
  }
447
446
  else if (delta === 0) {
448
- this._solutions = [new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_2__["default"](-b, 2 * a).reduce().dfrac];
447
+ this._solutions = [new _coefficients__WEBPACK_IMPORTED_MODULE_2__.Fraction(-b, 2 * a).reduce().dfrac];
449
448
  }
450
449
  else {
451
450
  this._solutions = [this._varnothing];
@@ -502,6 +501,65 @@ class Equation {
502
501
  }
503
502
 
504
503
 
504
+ /***/ }),
505
+
506
+ /***/ "./src/maths/algebra/index.ts":
507
+ /*!************************************!*\
508
+ !*** ./src/maths/algebra/index.ts ***!
509
+ \************************************/
510
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
511
+
512
+ __webpack_require__.r(__webpack_exports__);
513
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
514
+ /* harmony export */ "Equation": () => (/* reexport safe */ _equation__WEBPACK_IMPORTED_MODULE_0__.Equation),
515
+ /* harmony export */ "LinearSystem": () => (/* reexport safe */ _linearSystem__WEBPACK_IMPORTED_MODULE_1__.LinearSystem),
516
+ /* harmony export */ "Logicalset": () => (/* reexport safe */ _logicalset__WEBPACK_IMPORTED_MODULE_2__.Logicalset),
517
+ /* harmony export */ "Monom": () => (/* reexport safe */ _monom__WEBPACK_IMPORTED_MODULE_3__.Monom),
518
+ /* harmony export */ "Polynom": () => (/* reexport safe */ _polynom__WEBPACK_IMPORTED_MODULE_4__.Polynom),
519
+ /* harmony export */ "Rational": () => (/* reexport safe */ _rational__WEBPACK_IMPORTED_MODULE_5__.Rational),
520
+ /* harmony export */ "Algebra": () => (/* binding */ Algebra)
521
+ /* harmony export */ });
522
+ /* harmony import */ var _equation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./equation */ "./src/maths/algebra/equation.ts");
523
+ /* harmony import */ var _linearSystem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./linearSystem */ "./src/maths/algebra/linearSystem.ts");
524
+ /* harmony import */ var _logicalset__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./logicalset */ "./src/maths/algebra/logicalset.ts");
525
+ /* harmony import */ var _monom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./monom */ "./src/maths/algebra/monom.ts");
526
+ /* harmony import */ var _polynom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./polynom */ "./src/maths/algebra/polynom.ts");
527
+ /* harmony import */ var _rational__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./rational */ "./src/maths/algebra/rational.ts");
528
+
529
+
530
+
531
+
532
+
533
+
534
+
535
+
536
+
537
+
538
+
539
+
540
+ var Algebra;
541
+ (function (Algebra) {
542
+ class Polynom extends _polynom__WEBPACK_IMPORTED_MODULE_4__.Polynom {
543
+ }
544
+ Algebra.Polynom = Polynom;
545
+ class Monom extends _monom__WEBPACK_IMPORTED_MODULE_3__.Monom {
546
+ }
547
+ Algebra.Monom = Monom;
548
+ class LinearSystem extends _linearSystem__WEBPACK_IMPORTED_MODULE_1__.LinearSystem {
549
+ }
550
+ Algebra.LinearSystem = LinearSystem;
551
+ class Equation extends _equation__WEBPACK_IMPORTED_MODULE_0__.Equation {
552
+ }
553
+ Algebra.Equation = Equation;
554
+ class LogicalSet extends _logicalset__WEBPACK_IMPORTED_MODULE_2__.Logicalset {
555
+ }
556
+ Algebra.LogicalSet = LogicalSet;
557
+ class Rational extends _rational__WEBPACK_IMPORTED_MODULE_5__.Rational {
558
+ }
559
+ Algebra.Rational = Rational;
560
+ })(Algebra || (Algebra = {}));
561
+
562
+
505
563
  /***/ }),
506
564
 
507
565
  /***/ "./src/maths/algebra/linearSystem.ts":
@@ -512,12 +570,12 @@ class Equation {
512
570
 
513
571
  __webpack_require__.r(__webpack_exports__);
514
572
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
515
- /* harmony export */ "default": () => (/* binding */ LinearSystem)
573
+ /* harmony export */ "LinearSystem": () => (/* binding */ LinearSystem)
516
574
  /* harmony export */ });
517
- /* harmony import */ var _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../coefficients/fraction */ "./src/maths/coefficients/fraction.ts");
575
+ /* harmony import */ var _coefficients__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../coefficients */ "./src/maths/coefficients/index.ts");
518
576
  /* harmony import */ var _equation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./equation */ "./src/maths/algebra/equation.ts");
519
577
  /* harmony import */ var _polynom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./polynom */ "./src/maths/algebra/polynom.ts");
520
- /* harmony import */ var _random_random__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../random/random */ "./src/maths/random/random.ts");
578
+ /* harmony import */ var _random__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../random */ "./src/maths/random/index.ts");
521
579
 
522
580
 
523
581
 
@@ -602,7 +660,7 @@ class LinearSystem {
602
660
  return `(${tex.join(';')})`;
603
661
  }
604
662
  parse = (...equations) => {
605
- this._equations = equations.map(value => new _equation__WEBPACK_IMPORTED_MODULE_1__["default"](value));
663
+ this._equations = equations.map(value => new _equation__WEBPACK_IMPORTED_MODULE_1__.Equation(value));
606
664
  this._findLetters();
607
665
  return this;
608
666
  };
@@ -610,7 +668,7 @@ class LinearSystem {
610
668
  this._equations = [];
611
669
  let i = 0;
612
670
  while (i < coefficients.length - this._letters.length) {
613
- let left = new _polynom__WEBPACK_IMPORTED_MODULE_2__["default"]().parse(this._letters.join(''), ...coefficients.slice(i, i + this._letters.length)), right = new _polynom__WEBPACK_IMPORTED_MODULE_2__["default"](coefficients[i + this._letters.length].toString()), equ = new _equation__WEBPACK_IMPORTED_MODULE_1__["default"]().create(left, right);
671
+ let left = new _polynom__WEBPACK_IMPORTED_MODULE_2__.Polynom().parse(this._letters.join(''), ...coefficients.slice(i, i + this._letters.length)), right = new _polynom__WEBPACK_IMPORTED_MODULE_2__.Polynom(coefficients[i + this._letters.length].toString()), equ = new _equation__WEBPACK_IMPORTED_MODULE_1__.Equation().create(left, right);
614
672
  this._equations.push(equ.clone());
615
673
  i = i + this._letters.length + 1;
616
674
  }
@@ -635,7 +693,7 @@ class LinearSystem {
635
693
  let solutionsF = [];
636
694
  for (let s of solutions) {
637
695
  if (typeof s === "number") {
638
- solutionsF.push(new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"](s.toString()));
696
+ solutionsF.push(new _coefficients__WEBPACK_IMPORTED_MODULE_0__.Fraction(s.toString()));
639
697
  }
640
698
  else {
641
699
  solutionsF.push(s.clone());
@@ -648,15 +706,15 @@ class LinearSystem {
648
706
  return this;
649
707
  };
650
708
  _generateOneEquation = (...solutions) => {
651
- let coeff = [], leftValue = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"]().zero(), letters = ['x', 'y', 'z', 't', 'u', 'v', 'w', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l'], equString = '', equ;
709
+ let coeff = [], leftValue = new _coefficients__WEBPACK_IMPORTED_MODULE_0__.Fraction().zero(), letters = ['x', 'y', 'z', 't', 'u', 'v', 'w', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l'], equString = '', equ;
652
710
  for (let i = 0; i < solutions.length; i++) {
653
- coeff.push(_random_random__WEBPACK_IMPORTED_MODULE_3__.Random.numberSym(5));
711
+ coeff.push(_random__WEBPACK_IMPORTED_MODULE_3__.Random.numberSym(5));
654
712
  leftValue.add(solutions[i].clone().multiply(coeff[i]));
655
713
  equString += `${(coeff[i] < 0) ? coeff[i] : '+' + coeff[i]}${letters[i]}`;
656
714
  }
657
- equ = new _equation__WEBPACK_IMPORTED_MODULE_1__["default"](`${equString}=${leftValue.display}`);
715
+ equ = new _equation__WEBPACK_IMPORTED_MODULE_1__.Equation(`${equString}=${leftValue.display}`);
658
716
  if (equ.right.monoms[0].coefficient.denominator != 1) {
659
- equ.multiply(new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"](equ.right.monoms[0].coefficient.denominator, 1));
717
+ equ.multiply(new _coefficients__WEBPACK_IMPORTED_MODULE_0__.Fraction(equ.right.monoms[0].coefficient.denominator, 1));
660
718
  }
661
719
  if (this._checkIfLinerCombination(equ)) {
662
720
  return equ;
@@ -670,7 +728,7 @@ class LinearSystem {
670
728
  return this.mergeEquations(eq1, eq2, c2, c1);
671
729
  }
672
730
  mergeEquations = (eq1, eq2, factor1, factor2) => {
673
- let eq1multiplied = eq1.clone().multiply(new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"](factor1)), eq2multiplied = eq2.clone().multiply(new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"](factor2));
731
+ let eq1multiplied = eq1.clone().multiply(new _coefficients__WEBPACK_IMPORTED_MODULE_0__.Fraction(factor1)), eq2multiplied = eq2.clone().multiply(new _coefficients__WEBPACK_IMPORTED_MODULE_0__.Fraction(factor2));
674
732
  eq1multiplied.left.add(eq2multiplied.left);
675
733
  eq1multiplied.right.add(eq2multiplied.right);
676
734
  return eq1multiplied;
@@ -710,7 +768,7 @@ class LinearSystem {
710
768
  let E = this._resolutionSteps[this._resolutionSteps.length - 1].equations[0];
711
769
  E.solve();
712
770
  return {
713
- value: new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"](E.solutions[0]),
771
+ value: new _coefficients__WEBPACK_IMPORTED_MODULE_0__.Fraction(E.solutions[0]),
714
772
  isReal: E.isReal,
715
773
  isVarnothing: E.isVarnothing
716
774
  };
@@ -736,7 +794,7 @@ class LinearSystem {
736
794
 
737
795
  __webpack_require__.r(__webpack_exports__);
738
796
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
739
- /* harmony export */ "default": () => (/* binding */ Logicalset)
797
+ /* harmony export */ "Logicalset": () => (/* binding */ Logicalset)
740
798
  /* harmony export */ });
741
799
  /* harmony import */ var _shutingyard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../shutingyard */ "./src/maths/shutingyard.ts");
742
800
 
@@ -753,7 +811,7 @@ class Logicalset {
753
811
  }
754
812
  ;
755
813
  parse = (value) => {
756
- this._rpn = new _shutingyard__WEBPACK_IMPORTED_MODULE_0__["default"]('set').parse(value).rpn;
814
+ this._rpn = new _shutingyard__WEBPACK_IMPORTED_MODULE_0__.Shutingyard('set').parse(value).rpn;
757
815
  return this;
758
816
  };
759
817
  evaluate(tokenSets, reference) {
@@ -892,7 +950,7 @@ class Logicalset {
892
950
 
893
951
  __webpack_require__.r(__webpack_exports__);
894
952
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
895
- /* harmony export */ "default": () => (/* binding */ Monom)
953
+ /* harmony export */ "Monom": () => (/* binding */ Monom)
896
954
  /* harmony export */ });
897
955
  /* harmony import */ var _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../coefficients/fraction */ "./src/maths/coefficients/fraction.ts");
898
956
  /* harmony import */ var _numeric__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../numeric */ "./src/maths/numeric.ts");
@@ -993,7 +1051,7 @@ class Monom {
993
1051
  if (this.coefficient.numerator > 10000) {
994
1052
  return [this.clone()];
995
1053
  }
996
- const dividers = _numeric__WEBPACK_IMPORTED_MODULE_1__["default"].dividers(Math.abs(this.coefficient.numerator));
1054
+ const dividers = _numeric__WEBPACK_IMPORTED_MODULE_1__.Numeric.dividers(Math.abs(this.coefficient.numerator));
997
1055
  let litterals = [];
998
1056
  for (let L in this.literal) {
999
1057
  litterals = this._getLitteralDividers(litterals, L);
@@ -1003,7 +1061,7 @@ class Monom {
1003
1061
  for (let N of dividers) {
1004
1062
  for (let L of litterals) {
1005
1063
  let M = new Monom();
1006
- M.coefficient = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"](N);
1064
+ M.coefficient = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction(N);
1007
1065
  M.literal = L;
1008
1066
  monomDividers.push(M);
1009
1067
  }
@@ -1012,7 +1070,7 @@ class Monom {
1012
1070
  else if (dividers.length === 0) {
1013
1071
  for (let L of litterals) {
1014
1072
  let M = new Monom();
1015
- M.coefficient = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"]().one();
1073
+ M.coefficient = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction().one();
1016
1074
  M.literal = L;
1017
1075
  monomDividers.push(M);
1018
1076
  }
@@ -1020,7 +1078,7 @@ class Monom {
1020
1078
  else {
1021
1079
  for (let N of dividers) {
1022
1080
  let M = new Monom();
1023
- M.coefficient = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"](N);
1081
+ M.coefficient = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction(N);
1024
1082
  monomDividers.push(M);
1025
1083
  }
1026
1084
  }
@@ -1086,12 +1144,12 @@ class Monom {
1086
1144
  }
1087
1145
  parse = (inputStr) => {
1088
1146
  this.literalStr = inputStr;
1089
- this._coefficient = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"]();
1147
+ this._coefficient = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction();
1090
1148
  for (const v of [...inputStr.replace(/([a-z])|(\^[+-]?[0-9]+)/g, ',').split(',')]) {
1091
1149
  if (v.trim() === '') {
1092
1150
  continue;
1093
1151
  }
1094
- this._coefficient.multiply(new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"](v.trim()));
1152
+ this._coefficient.multiply(new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction(v.trim()));
1095
1153
  }
1096
1154
  return this;
1097
1155
  };
@@ -1104,12 +1162,12 @@ class Monom {
1104
1162
  return F;
1105
1163
  };
1106
1164
  zero = () => {
1107
- this._coefficient = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"]().zero();
1165
+ this._coefficient = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction().zero();
1108
1166
  this._literal = {};
1109
1167
  return this;
1110
1168
  };
1111
1169
  one = () => {
1112
- this._coefficient = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"]().one();
1170
+ this._coefficient = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction().one();
1113
1171
  this._literal = {};
1114
1172
  return this;
1115
1173
  };
@@ -1268,17 +1326,17 @@ class Monom {
1268
1326
  };
1269
1327
  evaluate = (values) => {
1270
1328
  let r = this.coefficient.clone();
1271
- if (typeof values === 'number' || values instanceof _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"]) {
1329
+ if (typeof values === 'number' || values instanceof _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction) {
1272
1330
  let tmpValues = {};
1273
- tmpValues[this.variables[0]] = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"](values);
1331
+ tmpValues[this.variables[0]] = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction(values);
1274
1332
  return this.evaluate(tmpValues);
1275
1333
  }
1276
1334
  if (typeof values === 'object') {
1277
1335
  for (let L in this._literal) {
1278
1336
  if (values[L] === undefined) {
1279
- return new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"]().zero();
1337
+ return new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction().zero();
1280
1338
  }
1281
- let value = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"](values[L]);
1339
+ let value = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction(values[L]);
1282
1340
  r.multiply(value.pow(this._literal[L]));
1283
1341
  }
1284
1342
  }
@@ -1291,7 +1349,7 @@ class Monom {
1291
1349
  if (this.hasLetter(letter)) {
1292
1350
  let d = +this._literal[letter], dM = this.clone();
1293
1351
  dM._literal[letter] -= 1;
1294
- dM._coefficient.multiply(new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"]('' + d));
1352
+ dM._coefficient.multiply(new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction('' + d));
1295
1353
  return dM;
1296
1354
  }
1297
1355
  else {
@@ -1309,15 +1367,15 @@ class Monom {
1309
1367
  }
1310
1368
  else {
1311
1369
  if (M.coefficient.isZero()) {
1312
- M.coefficient = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"]().one();
1370
+ M.coefficient = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction().one();
1313
1371
  }
1314
1372
  M.setLetter(letter, 1);
1315
1373
  }
1316
1374
  return M;
1317
1375
  };
1318
1376
  static lcm = (...monoms) => {
1319
- let M = new Monom(), coeffN = monoms.map(value => value.coefficient.numerator), coeffD = monoms.map(value => value.coefficient.denominator), n = _numeric__WEBPACK_IMPORTED_MODULE_1__["default"].gcd(...coeffN), d = _numeric__WEBPACK_IMPORTED_MODULE_1__["default"].lcm(...coeffD);
1320
- M.coefficient = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"](n, d).reduce();
1377
+ let M = new Monom(), coeffN = monoms.map(value => value.coefficient.numerator), coeffD = monoms.map(value => value.coefficient.denominator), n = _numeric__WEBPACK_IMPORTED_MODULE_1__.Numeric.gcd(...coeffN), d = _numeric__WEBPACK_IMPORTED_MODULE_1__.Numeric.lcm(...coeffD);
1378
+ M.coefficient = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction(n, d).reduce();
1321
1379
  for (let m of monoms) {
1322
1380
  for (let letter in M.literal) {
1323
1381
  if (!(letter in m.literal)) {
@@ -1375,12 +1433,12 @@ class Monom {
1375
1433
 
1376
1434
  __webpack_require__.r(__webpack_exports__);
1377
1435
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1378
- /* harmony export */ "default": () => (/* binding */ Polynom)
1436
+ /* harmony export */ "Polynom": () => (/* binding */ Polynom)
1379
1437
  /* harmony export */ });
1380
1438
  /* harmony import */ var _monom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./monom */ "./src/maths/algebra/monom.ts");
1381
1439
  /* harmony import */ var _shutingyard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../shutingyard */ "./src/maths/shutingyard.ts");
1382
1440
  /* harmony import */ var _numeric__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../numeric */ "./src/maths/numeric.ts");
1383
- /* harmony import */ var _random_random__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../random/random */ "./src/maths/random/random.ts");
1441
+ /* harmony import */ var _random__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../random */ "./src/maths/random/index.ts");
1384
1442
  /* harmony import */ var _coefficients_fraction__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../coefficients/fraction */ "./src/maths/coefficients/fraction.ts");
1385
1443
 
1386
1444
 
@@ -1491,8 +1549,8 @@ class Polynom {
1491
1549
  this._rawString = inputStr;
1492
1550
  if (inputStr !== '' && !isNaN(Number(inputStr))) {
1493
1551
  this.empty();
1494
- let m = new _monom__WEBPACK_IMPORTED_MODULE_0__["default"]();
1495
- m.coefficient = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_4__["default"](inputStr);
1552
+ let m = new _monom__WEBPACK_IMPORTED_MODULE_0__.Monom();
1553
+ m.coefficient = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_4__.Fraction(inputStr);
1496
1554
  m.literalStr = '';
1497
1555
  this.add(m);
1498
1556
  return this;
@@ -1501,11 +1559,11 @@ class Polynom {
1501
1559
  }
1502
1560
  else if (/^[a-z]/.test(inputStr)) {
1503
1561
  this.empty();
1504
- let fractions = values.map(x => new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_4__["default"](x));
1562
+ let fractions = values.map(x => new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_4__.Fraction(x));
1505
1563
  if (inputStr.length > 1) {
1506
1564
  let letters = inputStr.split(''), i = 0;
1507
1565
  for (let F of fractions) {
1508
- let m = new _monom__WEBPACK_IMPORTED_MODULE_0__["default"]();
1566
+ let m = new _monom__WEBPACK_IMPORTED_MODULE_0__.Monom();
1509
1567
  m.coefficient = F.clone();
1510
1568
  m.literalStr = letters[i] || '';
1511
1569
  this.add(m);
@@ -1515,7 +1573,7 @@ class Polynom {
1515
1573
  else {
1516
1574
  let n = fractions.length - 1;
1517
1575
  for (let F of fractions) {
1518
- let m = new _monom__WEBPACK_IMPORTED_MODULE_0__["default"]();
1576
+ let m = new _monom__WEBPACK_IMPORTED_MODULE_0__.Monom();
1519
1577
  m.coefficient = F.clone();
1520
1578
  m.literalStr = `${inputStr}^${n}`;
1521
1579
  this.add(m);
@@ -1529,7 +1587,7 @@ class Polynom {
1529
1587
  }
1530
1588
  };
1531
1589
  shutingYardToReducedPolynom = (inputStr) => {
1532
- const SY = new _shutingyard__WEBPACK_IMPORTED_MODULE_1__["default"]().parse(inputStr);
1590
+ const SY = new _shutingyard__WEBPACK_IMPORTED_MODULE_1__.Shutingyard().parse(inputStr);
1533
1591
  const rpn = SY.rpn;
1534
1592
  let m1;
1535
1593
  let m2;
@@ -1537,7 +1595,7 @@ class Polynom {
1537
1595
  for (const element of rpn) {
1538
1596
  if (element.tokenType === 'coefficient' || element.tokenType === 'variable') {
1539
1597
  tempPolynom = new Polynom().zero();
1540
- tempPolynom.monoms = [new _monom__WEBPACK_IMPORTED_MODULE_0__["default"](element.token)];
1598
+ tempPolynom.monoms = [new _monom__WEBPACK_IMPORTED_MODULE_0__.Monom(element.token)];
1541
1599
  stack.push(tempPolynom.clone());
1542
1600
  }
1543
1601
  else if (element.tokenType === 'operation') {
@@ -1573,13 +1631,13 @@ class Polynom {
1573
1631
  };
1574
1632
  zero = () => {
1575
1633
  this._monoms = [];
1576
- this._monoms.push(new _monom__WEBPACK_IMPORTED_MODULE_0__["default"]().zero());
1634
+ this._monoms.push(new _monom__WEBPACK_IMPORTED_MODULE_0__.Monom().zero());
1577
1635
  this._rawString = '0';
1578
1636
  return this;
1579
1637
  };
1580
1638
  one = () => {
1581
1639
  this._monoms = [];
1582
- this._monoms.push(new _monom__WEBPACK_IMPORTED_MODULE_0__["default"]().one());
1640
+ this._monoms.push(new _monom__WEBPACK_IMPORTED_MODULE_0__.Monom().one());
1583
1641
  this._rawString = '1';
1584
1642
  return this;
1585
1643
  };
@@ -1588,6 +1646,9 @@ class Polynom {
1588
1646
  this._rawString = '';
1589
1647
  return this;
1590
1648
  };
1649
+ random(config) {
1650
+ return _random__WEBPACK_IMPORTED_MODULE_3__.Random.polynom(config);
1651
+ }
1591
1652
  _randomizeDefaults = {
1592
1653
  degree: 2,
1593
1654
  unit: true,
@@ -1618,7 +1679,7 @@ class Polynom {
1618
1679
  rndFactorable = (degree = 2, unit = false, letters = 'x') => {
1619
1680
  this._factors = [];
1620
1681
  for (let i = 0; i < degree; i++) {
1621
- let factorUnit = unit === true || i >= unit, p = _random_random__WEBPACK_IMPORTED_MODULE_3__.Random.polynom({
1682
+ let factorUnit = unit === true || i >= unit, p = _random__WEBPACK_IMPORTED_MODULE_3__.Random.polynom({
1622
1683
  degree: 1,
1623
1684
  unit: factorUnit,
1624
1685
  fraction: false,
@@ -1645,10 +1706,10 @@ class Polynom {
1645
1706
  this._monoms.push(value.clone());
1646
1707
  }
1647
1708
  else if (Number.isSafeInteger(value)) {
1648
- this._monoms.push(new _monom__WEBPACK_IMPORTED_MODULE_0__["default"](value.toString()));
1709
+ this._monoms.push(new _monom__WEBPACK_IMPORTED_MODULE_0__.Monom(value.toString()));
1649
1710
  }
1650
1711
  else {
1651
- this._monoms.push(new _monom__WEBPACK_IMPORTED_MODULE_0__["default"](value));
1712
+ this._monoms.push(new _monom__WEBPACK_IMPORTED_MODULE_0__.Monom(value));
1652
1713
  }
1653
1714
  }
1654
1715
  return this.reduce();
@@ -1662,10 +1723,10 @@ class Polynom {
1662
1723
  this._monoms.push(value.clone().opposed());
1663
1724
  }
1664
1725
  else if (Number.isSafeInteger(value)) {
1665
- this._monoms.push(new _monom__WEBPACK_IMPORTED_MODULE_0__["default"](value.toString()).opposed());
1726
+ this._monoms.push(new _monom__WEBPACK_IMPORTED_MODULE_0__.Monom(value.toString()).opposed());
1666
1727
  }
1667
1728
  else {
1668
- this._monoms.push(new _monom__WEBPACK_IMPORTED_MODULE_0__["default"](value).opposed());
1729
+ this._monoms.push(new _monom__WEBPACK_IMPORTED_MODULE_0__.Monom(value).opposed());
1669
1730
  }
1670
1731
  }
1671
1732
  return this.reduce();
@@ -1689,7 +1750,7 @@ class Polynom {
1689
1750
  const M = [];
1690
1751
  for (const m1 of this._monoms) {
1691
1752
  for (const m2 of P.monoms) {
1692
- M.push(_monom__WEBPACK_IMPORTED_MODULE_0__["default"].xmultiply(m1, m2));
1753
+ M.push(_monom__WEBPACK_IMPORTED_MODULE_0__.Monom.xmultiply(m1, m2));
1693
1754
  }
1694
1755
  }
1695
1756
  this._monoms = M;
@@ -1702,7 +1763,7 @@ class Polynom {
1702
1763
  return this.reduce();
1703
1764
  };
1704
1765
  multiplyByInteger = (nb) => {
1705
- return this.multiplyByFraction(new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_4__["default"](nb));
1766
+ return this.multiplyByFraction(new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_4__.Fraction(nb));
1706
1767
  };
1707
1768
  multiplyByMonom = (M) => {
1708
1769
  for (const m of this._monoms) {
@@ -1741,7 +1802,7 @@ class Polynom {
1741
1802
  }
1742
1803
  };
1743
1804
  divideByInteger = (nb) => {
1744
- const nbF = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_4__["default"](nb);
1805
+ const nbF = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_4__.Fraction(nb);
1745
1806
  for (const m of this._monoms) {
1746
1807
  m.coefficient.divide(nbF);
1747
1808
  }
@@ -1936,7 +1997,7 @@ class Polynom {
1936
1997
  return this;
1937
1998
  };
1938
1999
  evaluate = (values) => {
1939
- const r = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_4__["default"]().zero();
2000
+ const r = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_4__.Fraction().zero();
1940
2001
  this._monoms.forEach(monom => {
1941
2002
  r.add(monom.evaluate(values));
1942
2003
  });
@@ -1990,7 +2051,7 @@ class Polynom {
1990
2051
  this._factors.push(P.clone());
1991
2052
  }
1992
2053
  else {
1993
- let Q = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_4__["default"](), F, degree = P.degree();
2054
+ let Q = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_4__.Fraction(), F, degree = P.degree();
1994
2055
  maxValue = maxValue === undefined ? 20 : maxValue;
1995
2056
  for (let a = 1; a <= maxValue; a++) {
1996
2057
  for (let b = -maxValue; b <= maxValue; b++) {
@@ -2146,7 +2207,7 @@ class Polynom {
2146
2207
  }
2147
2208
  case 1:
2148
2209
  if (this._monoms.length === 1) {
2149
- return [new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_4__["default"]().zero()];
2210
+ return [new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_4__.Fraction().zero()];
2150
2211
  }
2151
2212
  else {
2152
2213
  const P = this.clone().reduce().reorder();
@@ -2164,8 +2225,8 @@ class Polynom {
2164
2225
  let A = P.monomByDegree(2).coefficient, B = P.monomByDegree(1).coefficient, C = P.monomByDegree(0).coefficient, D = B.clone().pow(2).subtract(A.clone().multiply(C).multiply(4));
2165
2226
  if (D.value > 0) {
2166
2227
  let x1 = (-(B.value) + Math.sqrt(D.value)) / (2 * A.value), x2 = (-(B.value) - Math.sqrt(D.value)) / (2 * A.value);
2167
- zeroes.push(new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_4__["default"](x1.toFixed(3)).reduce());
2168
- zeroes.push(new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_4__["default"](x2.toFixed(3)).reduce());
2228
+ zeroes.push(new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_4__.Fraction(x1.toFixed(3)).reduce());
2229
+ zeroes.push(new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_4__.Fraction(x2.toFixed(3)).reduce());
2169
2230
  }
2170
2231
  else if (D.value === 0) {
2171
2232
  }
@@ -2199,7 +2260,7 @@ class Polynom {
2199
2260
  return m.clone();
2200
2261
  }
2201
2262
  }
2202
- return new _monom__WEBPACK_IMPORTED_MODULE_0__["default"]().zero();
2263
+ return new _monom__WEBPACK_IMPORTED_MODULE_0__.Monom().zero();
2203
2264
  };
2204
2265
  monomsByDegree = (degree, letter) => {
2205
2266
  if (degree === undefined) {
@@ -2221,7 +2282,7 @@ class Polynom {
2221
2282
  return m.clone();
2222
2283
  }
2223
2284
  }
2224
- return new _monom__WEBPACK_IMPORTED_MODULE_0__["default"]().zero();
2285
+ return new _monom__WEBPACK_IMPORTED_MODULE_0__.Monom().zero();
2225
2286
  };
2226
2287
  getDenominators = () => {
2227
2288
  const denominators = [];
@@ -2238,22 +2299,22 @@ class Polynom {
2238
2299
  return numerators;
2239
2300
  };
2240
2301
  lcmDenominator = () => {
2241
- return _numeric__WEBPACK_IMPORTED_MODULE_2__["default"].lcm(...this.getDenominators());
2302
+ return _numeric__WEBPACK_IMPORTED_MODULE_2__.Numeric.lcm(...this.getDenominators());
2242
2303
  };
2243
2304
  gcdDenominator = () => {
2244
- return _numeric__WEBPACK_IMPORTED_MODULE_2__["default"].gcd(...this.getDenominators());
2305
+ return _numeric__WEBPACK_IMPORTED_MODULE_2__.Numeric.gcd(...this.getDenominators());
2245
2306
  };
2246
2307
  lcmNumerator = () => {
2247
- return _numeric__WEBPACK_IMPORTED_MODULE_2__["default"].lcm(...this.getNumerators());
2308
+ return _numeric__WEBPACK_IMPORTED_MODULE_2__.Numeric.lcm(...this.getNumerators());
2248
2309
  };
2249
2310
  gcdNumerator = () => {
2250
- return _numeric__WEBPACK_IMPORTED_MODULE_2__["default"].gcd(...this.getNumerators());
2311
+ return _numeric__WEBPACK_IMPORTED_MODULE_2__.Numeric.gcd(...this.getNumerators());
2251
2312
  };
2252
2313
  commonMonom = () => {
2253
- let M = new _monom__WEBPACK_IMPORTED_MODULE_0__["default"]().one(), numerator, denominator, degree = this.degree();
2314
+ let M = new _monom__WEBPACK_IMPORTED_MODULE_0__.Monom().one(), numerator, denominator, degree = this.degree();
2254
2315
  numerator = this.gcdNumerator();
2255
2316
  denominator = this.gcdDenominator();
2256
- M.coefficient = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_4__["default"](numerator, denominator);
2317
+ M.coefficient = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_4__.Fraction(numerator, denominator);
2257
2318
  for (let L of this.variables) {
2258
2319
  M.setLetter(L, degree);
2259
2320
  for (let m of this._monoms) {
@@ -2270,7 +2331,7 @@ class Polynom {
2270
2331
  if (this.degree() < 1) {
2271
2332
  return this;
2272
2333
  }
2273
- const mDegree = _random_random__WEBPACK_IMPORTED_MODULE_3__.Random.number(0, this.degree() - 1);
2334
+ const mDegree = _random__WEBPACK_IMPORTED_MODULE_3__.Random.number(0, this.degree() - 1);
2274
2335
  return this;
2275
2336
  };
2276
2337
  factorizePartial = (forceSign) => {
@@ -2283,9 +2344,9 @@ class Polynom {
2283
2344
  mMain = this._monoms[i].clone();
2284
2345
  for (let j = i + 1; j < this.length; j++) {
2285
2346
  mCheck = this._monoms[j].clone();
2286
- g = _numeric__WEBPACK_IMPORTED_MODULE_2__["default"].gcd(mMain.coefficient.numerator, mCheck.coefficient.numerator);
2347
+ g = _numeric__WEBPACK_IMPORTED_MODULE_2__.Numeric.gcd(mMain.coefficient.numerator, mCheck.coefficient.numerator);
2287
2348
  if (g !== 1) {
2288
- mFactor = _monom__WEBPACK_IMPORTED_MODULE_0__["default"].lcm(mMain, mCheck);
2349
+ mFactor = _monom__WEBPACK_IMPORTED_MODULE_0__.Monom.lcm(mMain, mCheck);
2289
2350
  sign = mMain.coefficient.sign() === 1 ? '+' : '-';
2290
2351
  this._texString = `${forceSign === true ? sign : (sign === '+' ? '' : sign)}${mFactor.tex}`;
2291
2352
  pFactor = new Polynom().add(mMain.divide(mFactor)).add(mCheck.divide(mFactor));
@@ -2335,7 +2396,7 @@ class Polynom {
2335
2396
 
2336
2397
  __webpack_require__.r(__webpack_exports__);
2337
2398
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2338
- /* harmony export */ "default": () => (/* binding */ Rational)
2399
+ /* harmony export */ "Rational": () => (/* binding */ Rational)
2339
2400
  /* harmony export */ });
2340
2401
  /* harmony import */ var _polynom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./polynom */ "./src/maths/algebra/polynom.ts");
2341
2402
 
@@ -2344,8 +2405,8 @@ class Rational {
2344
2405
  _numerator;
2345
2406
  _denominator;
2346
2407
  constructor(numerator, denominator) {
2347
- this._numerator = numerator ? numerator.clone() : new _polynom__WEBPACK_IMPORTED_MODULE_0__["default"]();
2348
- this._denominator = denominator ? denominator.clone() : new _polynom__WEBPACK_IMPORTED_MODULE_0__["default"]();
2408
+ this._numerator = numerator ? numerator.clone() : new _polynom__WEBPACK_IMPORTED_MODULE_0__.Polynom();
2409
+ this._denominator = denominator ? denominator.clone() : new _polynom__WEBPACK_IMPORTED_MODULE_0__.Polynom();
2349
2410
  }
2350
2411
  clone = () => {
2351
2412
  this._numerator = this._numerator.clone();
@@ -2453,7 +2514,7 @@ class Rational {
2453
2514
 
2454
2515
  __webpack_require__.r(__webpack_exports__);
2455
2516
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2456
- /* harmony export */ "default": () => (/* binding */ Fraction)
2517
+ /* harmony export */ "Fraction": () => (/* binding */ Fraction)
2457
2518
  /* harmony export */ });
2458
2519
  /* harmony import */ var _numeric__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../numeric */ "./src/maths/numeric.ts");
2459
2520
 
@@ -2668,7 +2729,7 @@ class Fraction {
2668
2729
  return this;
2669
2730
  };
2670
2731
  reduce = () => {
2671
- let g = _numeric__WEBPACK_IMPORTED_MODULE_0__["default"].gcd(this._numerator, this._denominator);
2732
+ let g = _numeric__WEBPACK_IMPORTED_MODULE_0__.Numeric.gcd(this._numerator, this._denominator);
2672
2733
  this._numerator = this._numerator / g;
2673
2734
  this._denominator = this._denominator / g;
2674
2735
  if (this._denominator < 0) {
@@ -2754,7 +2815,7 @@ class Fraction {
2754
2815
  return Math.sqrt(this._numerator) % 1 === 0 && Math.sqrt(this._denominator) % 1 === 0;
2755
2816
  };
2756
2817
  isReduced = () => {
2757
- return Math.abs(_numeric__WEBPACK_IMPORTED_MODULE_0__["default"].gcd(this._numerator, this._denominator)) === 1;
2818
+ return Math.abs(_numeric__WEBPACK_IMPORTED_MODULE_0__.Numeric.gcd(this._numerator, this._denominator)) === 1;
2758
2819
  };
2759
2820
  sign = () => {
2760
2821
  return (this._numerator * this._denominator >= 0) ? 1 : -1;
@@ -2770,6 +2831,25 @@ class Fraction {
2770
2831
  }
2771
2832
 
2772
2833
 
2834
+ /***/ }),
2835
+
2836
+ /***/ "./src/maths/coefficients/index.ts":
2837
+ /*!*****************************************!*\
2838
+ !*** ./src/maths/coefficients/index.ts ***!
2839
+ \*****************************************/
2840
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
2841
+
2842
+ __webpack_require__.r(__webpack_exports__);
2843
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2844
+ /* harmony export */ "Fraction": () => (/* reexport safe */ _fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction),
2845
+ /* harmony export */ "Nthroot": () => (/* reexport safe */ _nthroot__WEBPACK_IMPORTED_MODULE_1__.Nthroot)
2846
+ /* harmony export */ });
2847
+ /* harmony import */ var _fraction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./fraction */ "./src/maths/coefficients/fraction.ts");
2848
+ /* harmony import */ var _nthroot__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./nthroot */ "./src/maths/coefficients/nthroot.ts");
2849
+
2850
+
2851
+
2852
+
2773
2853
  /***/ }),
2774
2854
 
2775
2855
  /***/ "./src/maths/coefficients/nthroot.ts":
@@ -2780,7 +2860,7 @@ class Fraction {
2780
2860
 
2781
2861
  __webpack_require__.r(__webpack_exports__);
2782
2862
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2783
- /* harmony export */ "default": () => (/* binding */ Nthroot)
2863
+ /* harmony export */ "Nthroot": () => (/* binding */ Nthroot)
2784
2864
  /* harmony export */ });
2785
2865
  class Nthroot {
2786
2866
  _radical;
@@ -2885,7 +2965,7 @@ class Nthroot {
2885
2965
 
2886
2966
  __webpack_require__.r(__webpack_exports__);
2887
2967
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2888
- /* harmony export */ "default": () => (/* binding */ Circle)
2968
+ /* harmony export */ "Circle": () => (/* binding */ Circle)
2889
2969
  /* harmony export */ });
2890
2970
  /* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./point */ "./src/maths/geometry/point.ts");
2891
2971
  /* harmony import */ var _coefficients_fraction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../coefficients/fraction */ "./src/maths/coefficients/fraction.ts");
@@ -2907,8 +2987,8 @@ class Circle {
2907
2987
  }
2908
2988
  parse(...values) {
2909
2989
  if (values.length === 2) {
2910
- this._center = new _point__WEBPACK_IMPORTED_MODULE_0__["default"](values[0]);
2911
- this._radius = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_1__["default"](values[1]);
2990
+ this._center = new _point__WEBPACK_IMPORTED_MODULE_0__.Point(values[0]);
2991
+ this._radius = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_1__.Fraction(values[1]);
2912
2992
  }
2913
2993
  }
2914
2994
  get tex() {
@@ -2928,12 +3008,64 @@ class Circle {
2928
3008
  return `${cx}+${cy}=${this._radius.pow(2).tex}`;
2929
3009
  }
2930
3010
  get developed() {
2931
- let equ = new _algebra_equation__WEBPACK_IMPORTED_MODULE_2__["default"](new _algebra_polynom__WEBPACK_IMPORTED_MODULE_3__["default"](`(x-(${this._center.x.display}))^2+(y-(${this._center.y.display}))^2`), new _algebra_polynom__WEBPACK_IMPORTED_MODULE_3__["default"](`${this._radius.pow(2).display}`));
3011
+ let equ = new _algebra_equation__WEBPACK_IMPORTED_MODULE_2__.Equation(new _algebra_polynom__WEBPACK_IMPORTED_MODULE_3__.Polynom(`(x-(${this._center.x.display}))^2+(y-(${this._center.y.display}))^2`), new _algebra_polynom__WEBPACK_IMPORTED_MODULE_3__.Polynom(`${this._radius.pow(2).display}`));
2932
3012
  return equ.moveLeft().tex;
2933
3013
  }
2934
3014
  }
2935
3015
 
2936
3016
 
3017
+ /***/ }),
3018
+
3019
+ /***/ "./src/maths/geometry/index.ts":
3020
+ /*!*************************************!*\
3021
+ !*** ./src/maths/geometry/index.ts ***!
3022
+ \*************************************/
3023
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3024
+
3025
+ __webpack_require__.r(__webpack_exports__);
3026
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3027
+ /* harmony export */ "Vector": () => (/* reexport safe */ _vector__WEBPACK_IMPORTED_MODULE_0__.Vector),
3028
+ /* harmony export */ "Triangle": () => (/* reexport safe */ _triangle__WEBPACK_IMPORTED_MODULE_1__.Triangle),
3029
+ /* harmony export */ "Point": () => (/* reexport safe */ _point__WEBPACK_IMPORTED_MODULE_2__.Point),
3030
+ /* harmony export */ "Circle": () => (/* reexport safe */ _circle__WEBPACK_IMPORTED_MODULE_3__.Circle),
3031
+ /* harmony export */ "Line": () => (/* reexport safe */ _line__WEBPACK_IMPORTED_MODULE_4__.Line),
3032
+ /* harmony export */ "Geometry": () => (/* binding */ Geometry)
3033
+ /* harmony export */ });
3034
+ /* harmony import */ var _vector__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./vector */ "./src/maths/geometry/vector.ts");
3035
+ /* harmony import */ var _triangle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./triangle */ "./src/maths/geometry/triangle.ts");
3036
+ /* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./point */ "./src/maths/geometry/point.ts");
3037
+ /* harmony import */ var _circle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./circle */ "./src/maths/geometry/circle.ts");
3038
+ /* harmony import */ var _line__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./line */ "./src/maths/geometry/line.ts");
3039
+
3040
+
3041
+
3042
+
3043
+
3044
+
3045
+
3046
+
3047
+
3048
+
3049
+ var Geometry;
3050
+ (function (Geometry) {
3051
+ class Circle extends _circle__WEBPACK_IMPORTED_MODULE_3__.Circle {
3052
+ }
3053
+ Geometry.Circle = Circle;
3054
+ class Line extends _line__WEBPACK_IMPORTED_MODULE_4__.Line {
3055
+ }
3056
+ Geometry.Line = Line;
3057
+ class Point extends _point__WEBPACK_IMPORTED_MODULE_2__.Point {
3058
+ }
3059
+ Geometry.Point = Point;
3060
+ class Triangle extends _triangle__WEBPACK_IMPORTED_MODULE_1__.Triangle {
3061
+ }
3062
+ Geometry.Triangle = Triangle;
3063
+ class Vector extends _vector__WEBPACK_IMPORTED_MODULE_0__.Vector {
3064
+ }
3065
+ Geometry.Vector = Vector;
3066
+ })(Geometry || (Geometry = {}));
3067
+
3068
+
2937
3069
  /***/ }),
2938
3070
 
2939
3071
  /***/ "./src/maths/geometry/line.ts":
@@ -2944,7 +3076,7 @@ class Circle {
2944
3076
 
2945
3077
  __webpack_require__.r(__webpack_exports__);
2946
3078
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2947
- /* harmony export */ "default": () => (/* binding */ Line)
3079
+ /* harmony export */ "Line": () => (/* binding */ Line)
2948
3080
  /* harmony export */ });
2949
3081
  /* harmony import */ var _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../coefficients/fraction */ "./src/maths/coefficients/fraction.ts");
2950
3082
  /* harmony import */ var _vector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./vector */ "./src/maths/geometry/vector.ts");
@@ -2976,7 +3108,7 @@ class Line {
2976
3108
  get isLine() { return true; }
2977
3109
  get exists() { return this._exists; }
2978
3110
  get equation() {
2979
- return new _algebra_equation__WEBPACK_IMPORTED_MODULE_5__["default"](new _algebra_polynom__WEBPACK_IMPORTED_MODULE_3__["default"]().parse('xy', this._a, this._b, this._c), new _algebra_polynom__WEBPACK_IMPORTED_MODULE_3__["default"]('0')).simplify();
3111
+ return new _algebra_equation__WEBPACK_IMPORTED_MODULE_5__.Equation(new _algebra_polynom__WEBPACK_IMPORTED_MODULE_3__.Polynom().parse('xy', this._a, this._b, this._c), new _algebra_polynom__WEBPACK_IMPORTED_MODULE_3__.Polynom('0')).simplify();
2980
3112
  }
2981
3113
  get tex() {
2982
3114
  let canonical = this.equation;
@@ -2985,8 +3117,8 @@ class Line {
2985
3117
  }
2986
3118
  return {
2987
3119
  canonical: canonical.tex,
2988
- mxh: this.slope.isInfinity() ? 'x=' + this.OA.x.tex : 'y=' + new _algebra_polynom__WEBPACK_IMPORTED_MODULE_3__["default"]().parse('x', this.slope, this.height).tex,
2989
- parametric: `${_point__WEBPACK_IMPORTED_MODULE_2__["default"].pmatrix('x', 'y')} = ${_point__WEBPACK_IMPORTED_MODULE_2__["default"].pmatrix(this._OA.x, this._OA.y)} + k\\cdot ${_point__WEBPACK_IMPORTED_MODULE_2__["default"].pmatrix(this._d.x, this._d.y)}`
3120
+ mxh: this.slope.isInfinity() ? 'x=' + this.OA.x.tex : 'y=' + new _algebra_polynom__WEBPACK_IMPORTED_MODULE_3__.Polynom().parse('x', this.slope, this.height).tex,
3121
+ parametric: `${_point__WEBPACK_IMPORTED_MODULE_2__.Point.pmatrix('x', 'y')} = ${_point__WEBPACK_IMPORTED_MODULE_2__.Point.pmatrix(this._OA.x, this._OA.y)} + k\\cdot ${_point__WEBPACK_IMPORTED_MODULE_2__.Point.pmatrix(this._d.x, this._d.y)}`
2990
3122
  };
2991
3123
  }
2992
3124
  get a() {
@@ -3020,7 +3152,7 @@ class Line {
3020
3152
  return this._n;
3021
3153
  }
3022
3154
  get normal() {
3023
- return new _vector__WEBPACK_IMPORTED_MODULE_1__["default"](this._a, this._b);
3155
+ return new _vector__WEBPACK_IMPORTED_MODULE_1__.Vector(this._a, this._b);
3024
3156
  }
3025
3157
  set d(value) {
3026
3158
  this._d = value;
@@ -3041,14 +3173,14 @@ class Line {
3041
3173
  return this.parseByPointAndVector(values[0], values[1]);
3042
3174
  }
3043
3175
  else if (values[0].isPoint && values[1].isPoint) {
3044
- return this.parseByPointAndVector(values[0], new _vector__WEBPACK_IMPORTED_MODULE_1__["default"](values[0], values[1]));
3176
+ return this.parseByPointAndVector(values[0], new _vector__WEBPACK_IMPORTED_MODULE_1__.Vector(values[0], values[1]));
3045
3177
  }
3046
3178
  }
3047
3179
  else if (values.length === 1) {
3048
3180
  if (values[0].isLine) {
3049
3181
  return values[0].clone();
3050
3182
  }
3051
- let equ = new _algebra_equation__WEBPACK_IMPORTED_MODULE_5__["default"](values[0]);
3183
+ let equ = new _algebra_equation__WEBPACK_IMPORTED_MODULE_5__.Equation(values[0]);
3052
3184
  if (equ.isEquation) {
3053
3185
  equ.reorder(true);
3054
3186
  let letters = new Set(equ.letters());
@@ -3071,11 +3203,11 @@ class Line {
3071
3203
  return this;
3072
3204
  };
3073
3205
  parseByCoefficient = (a, b, c) => {
3074
- this._a = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"](a);
3075
- this._b = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"](b);
3076
- this._c = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"](c);
3077
- this._d = new _vector__WEBPACK_IMPORTED_MODULE_1__["default"](this._b.clone(), this._a.clone().opposed());
3078
- this._OA = new _point__WEBPACK_IMPORTED_MODULE_2__["default"](new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"]().zero(), this._c.clone());
3206
+ this._a = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction(a);
3207
+ this._b = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction(b);
3208
+ this._c = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction(c);
3209
+ this._d = new _vector__WEBPACK_IMPORTED_MODULE_1__.Vector(this._b.clone(), this._a.clone().opposed());
3210
+ this._OA = new _point__WEBPACK_IMPORTED_MODULE_2__.Point(new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction().zero(), this._c.clone());
3079
3211
  this._n = this._d.clone().normal();
3080
3212
  this._exists = true;
3081
3213
  return this;
@@ -3104,13 +3236,13 @@ class Line {
3104
3236
  return this.slope.isEqual(line.slope) && this.height.isEqual(line.height);
3105
3237
  };
3106
3238
  simplifyDirection = () => {
3107
- let lcm = _numeric__WEBPACK_IMPORTED_MODULE_4__["default"].lcm(this._d.x.denominator, this._d.y.denominator), gcd = _numeric__WEBPACK_IMPORTED_MODULE_4__["default"].gcd(this._d.x.numerator, this._d.y.numerator);
3239
+ let lcm = _numeric__WEBPACK_IMPORTED_MODULE_4__.Numeric.lcm(this._d.x.denominator, this._d.y.denominator), gcd = _numeric__WEBPACK_IMPORTED_MODULE_4__.Numeric.gcd(this._d.x.numerator, this._d.y.numerator);
3108
3240
  this._d.x.multiply(lcm).divide(gcd);
3109
3241
  this._d.y.multiply(lcm).divide(gcd);
3110
3242
  return this;
3111
3243
  };
3112
3244
  intersection = (line) => {
3113
- let Pt = new _point__WEBPACK_IMPORTED_MODULE_2__["default"](), isParallel = false, isSame = false, hasIntersection = true;
3245
+ let Pt = new _point__WEBPACK_IMPORTED_MODULE_2__.Point(), isParallel = false, isSame = false, hasIntersection = true;
3114
3246
  if (this._b.isZero() || line.b.isZero()) {
3115
3247
  }
3116
3248
  if (this.isParellelTo(line)) {
@@ -3144,7 +3276,7 @@ class Line {
3144
3276
  return {
3145
3277
  value: NaN,
3146
3278
  tex: 'Not a line',
3147
- fraction: new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"]().infinite()
3279
+ fraction: new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction().infinite()
3148
3280
  };
3149
3281
  }
3150
3282
  let value = numerator.value / Math.sqrt(d2.value), F = numerator.clone().divide(d2.clone().sqrt());
@@ -3214,7 +3346,7 @@ class Line {
3214
3346
 
3215
3347
  __webpack_require__.r(__webpack_exports__);
3216
3348
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3217
- /* harmony export */ "default": () => (/* binding */ Point)
3349
+ /* harmony export */ "Point": () => (/* binding */ Point)
3218
3350
  /* harmony export */ });
3219
3351
  /* harmony import */ var _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../coefficients/fraction */ "./src/maths/coefficients/fraction.ts");
3220
3352
 
@@ -3223,8 +3355,8 @@ class Point {
3223
3355
  _y;
3224
3356
  _exist;
3225
3357
  constructor(...values) {
3226
- this._x = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"]().zero();
3227
- this._y = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"]().zero();
3358
+ this._x = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction().zero();
3359
+ this._y = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction().zero();
3228
3360
  if (values !== undefined) {
3229
3361
  this.parse(...values);
3230
3362
  }
@@ -3266,22 +3398,22 @@ class Point {
3266
3398
  if (typeof values[0] === 'string') {
3267
3399
  let xy = values[0].split(',');
3268
3400
  if (xy.length === 2) {
3269
- this._x = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"](xy[0]).reduce();
3270
- this._y = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"](xy[1]).reduce();
3401
+ this._x = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction(xy[0]).reduce();
3402
+ this._y = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction(xy[1]).reduce();
3271
3403
  return this;
3272
3404
  }
3273
3405
  }
3274
3406
  if (values[0].x !== undefined && values[0].y !== undefined) {
3275
- this._x = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"](values[0].x).reduce();
3276
- this._y = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"](values[0].y).reduce();
3407
+ this._x = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction(values[0].x).reduce();
3408
+ this._y = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction(values[0].y).reduce();
3277
3409
  }
3278
3410
  else {
3279
3411
  return this.zero();
3280
3412
  }
3281
3413
  }
3282
3414
  if (values.length === 2) {
3283
- this._x = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"](values[0]).reduce();
3284
- this._y = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"](values[1]).reduce();
3415
+ this._x = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction(values[0]).reduce();
3416
+ this._y = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction(values[1]).reduce();
3285
3417
  }
3286
3418
  return this;
3287
3419
  };
@@ -3291,8 +3423,8 @@ class Point {
3291
3423
  return this;
3292
3424
  };
3293
3425
  zero = () => {
3294
- this._x = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"](null);
3295
- this._y = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"](null);
3426
+ this._x = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction(null);
3427
+ this._y = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction(null);
3296
3428
  return this;
3297
3429
  };
3298
3430
  origin = () => {
@@ -3331,7 +3463,7 @@ class Point {
3331
3463
 
3332
3464
  __webpack_require__.r(__webpack_exports__);
3333
3465
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3334
- /* harmony export */ "default": () => (/* binding */ Triangle)
3466
+ /* harmony export */ "Triangle": () => (/* binding */ Triangle)
3335
3467
  /* harmony export */ });
3336
3468
  /* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./point */ "./src/maths/geometry/point.ts");
3337
3469
  /* harmony import */ var _coefficients_fraction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../coefficients/fraction */ "./src/maths/coefficients/fraction.ts");
@@ -3413,12 +3545,12 @@ class Triangle {
3413
3545
  }
3414
3546
  parse = (...values) => {
3415
3547
  if (values.length === 6) {
3416
- let v = values.map((x) => new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_1__["default"](x));
3417
- return this.parse(new _point__WEBPACK_IMPORTED_MODULE_0__["default"](v[0], v[1]), new _point__WEBPACK_IMPORTED_MODULE_0__["default"](v[2], v[3]), new _point__WEBPACK_IMPORTED_MODULE_0__["default"](v[4], v[5]));
3548
+ let v = values.map((x) => new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_1__.Fraction(x));
3549
+ return this.parse(new _point__WEBPACK_IMPORTED_MODULE_0__.Point(v[0], v[1]), new _point__WEBPACK_IMPORTED_MODULE_0__.Point(v[2], v[3]), new _point__WEBPACK_IMPORTED_MODULE_0__.Point(v[4], v[5]));
3418
3550
  }
3419
3551
  else if (values.length === 3) {
3420
3552
  if (values.filter((x) => typeof x === 'string').length === 3) {
3421
- return this.parse(...values.map((x) => new _line__WEBPACK_IMPORTED_MODULE_3__["default"](x)));
3553
+ return this.parse(...values.map((x) => new _line__WEBPACK_IMPORTED_MODULE_3__.Line(x)));
3422
3554
  }
3423
3555
  else if (values.filter((x) => x.isLine === true).length === 3) {
3424
3556
  this._lines = {
@@ -3450,15 +3582,15 @@ class Triangle {
3450
3582
  }
3451
3583
  else {
3452
3584
  if (values.filter((x) => x.isPoint === true).length < 3) {
3453
- return this.parse(new _point__WEBPACK_IMPORTED_MODULE_0__["default"](values[0]), new _point__WEBPACK_IMPORTED_MODULE_0__["default"](values[1]), new _point__WEBPACK_IMPORTED_MODULE_0__["default"](values[2]));
3585
+ return this.parse(new _point__WEBPACK_IMPORTED_MODULE_0__.Point(values[0]), new _point__WEBPACK_IMPORTED_MODULE_0__.Point(values[1]), new _point__WEBPACK_IMPORTED_MODULE_0__.Point(values[2]));
3454
3586
  }
3455
3587
  this._A = values[0].clone();
3456
3588
  this._B = values[1].clone();
3457
3589
  this._C = values[2].clone();
3458
3590
  this._lines = {
3459
- 'AB': new _line__WEBPACK_IMPORTED_MODULE_3__["default"](this._A, this._B),
3460
- 'BC': new _line__WEBPACK_IMPORTED_MODULE_3__["default"](this._B, this._C),
3461
- 'AC': new _line__WEBPACK_IMPORTED_MODULE_3__["default"](this._A, this._C)
3591
+ 'AB': new _line__WEBPACK_IMPORTED_MODULE_3__.Line(this._A, this._B),
3592
+ 'BC': new _line__WEBPACK_IMPORTED_MODULE_3__.Line(this._B, this._C),
3593
+ 'AC': new _line__WEBPACK_IMPORTED_MODULE_3__.Line(this._A, this._C)
3462
3594
  };
3463
3595
  }
3464
3596
  }
@@ -3484,9 +3616,9 @@ class Triangle {
3484
3616
  };
3485
3617
  _updateTriangle = () => {
3486
3618
  this._middles = {
3487
- 'AB': new _point__WEBPACK_IMPORTED_MODULE_0__["default"]().middleOf(this._A, this._B),
3488
- 'AC': new _point__WEBPACK_IMPORTED_MODULE_0__["default"]().middleOf(this._A, this._C),
3489
- 'BC': new _point__WEBPACK_IMPORTED_MODULE_0__["default"]().middleOf(this._B, this._C)
3619
+ 'AB': new _point__WEBPACK_IMPORTED_MODULE_0__.Point().middleOf(this._A, this._B),
3620
+ 'AC': new _point__WEBPACK_IMPORTED_MODULE_0__.Point().middleOf(this._A, this._C),
3621
+ 'BC': new _point__WEBPACK_IMPORTED_MODULE_0__.Point().middleOf(this._B, this._C)
3490
3622
  };
3491
3623
  this._remarquables = this._calculateRemarquableLines();
3492
3624
  };
@@ -3502,26 +3634,26 @@ class Triangle {
3502
3634
  return this._A;
3503
3635
  };
3504
3636
  getSegment = (ptName1, ptName2) => {
3505
- return new _vector__WEBPACK_IMPORTED_MODULE_2__["default"](this.getPointByName(ptName1), this.getPointByName(ptName2));
3637
+ return new _vector__WEBPACK_IMPORTED_MODULE_2__.Vector(this.getPointByName(ptName1), this.getPointByName(ptName2));
3506
3638
  };
3507
3639
  _calculateRemarquableLines = () => {
3508
3640
  let remarquables = {
3509
3641
  'medians': {
3510
- 'A': new _line__WEBPACK_IMPORTED_MODULE_3__["default"](this._A, this._middles.BC),
3511
- 'B': new _line__WEBPACK_IMPORTED_MODULE_3__["default"](this._B, this._middles.AC),
3512
- 'C': new _line__WEBPACK_IMPORTED_MODULE_3__["default"](this._C, this._middles.AB),
3642
+ 'A': new _line__WEBPACK_IMPORTED_MODULE_3__.Line(this._A, this._middles.BC),
3643
+ 'B': new _line__WEBPACK_IMPORTED_MODULE_3__.Line(this._B, this._middles.AC),
3644
+ 'C': new _line__WEBPACK_IMPORTED_MODULE_3__.Line(this._C, this._middles.AB),
3513
3645
  'intersection': null
3514
3646
  },
3515
3647
  'mediators': {
3516
- 'AB': new _line__WEBPACK_IMPORTED_MODULE_3__["default"](this._middles.AB, new _vector__WEBPACK_IMPORTED_MODULE_2__["default"](this._A, this._B).normal()),
3517
- 'AC': new _line__WEBPACK_IMPORTED_MODULE_3__["default"](this._middles.AC, new _vector__WEBPACK_IMPORTED_MODULE_2__["default"](this._A, this._C).normal()),
3518
- 'BC': new _line__WEBPACK_IMPORTED_MODULE_3__["default"](this._middles.BC, new _vector__WEBPACK_IMPORTED_MODULE_2__["default"](this._B, this._C).normal()),
3648
+ 'AB': new _line__WEBPACK_IMPORTED_MODULE_3__.Line(this._middles.AB, new _vector__WEBPACK_IMPORTED_MODULE_2__.Vector(this._A, this._B).normal()),
3649
+ 'AC': new _line__WEBPACK_IMPORTED_MODULE_3__.Line(this._middles.AC, new _vector__WEBPACK_IMPORTED_MODULE_2__.Vector(this._A, this._C).normal()),
3650
+ 'BC': new _line__WEBPACK_IMPORTED_MODULE_3__.Line(this._middles.BC, new _vector__WEBPACK_IMPORTED_MODULE_2__.Vector(this._B, this._C).normal()),
3519
3651
  'intersection': null
3520
3652
  },
3521
3653
  'heights': {
3522
- 'A': new _line__WEBPACK_IMPORTED_MODULE_3__["default"](this._A, new _vector__WEBPACK_IMPORTED_MODULE_2__["default"](this._B, this._C).normal()),
3523
- 'B': new _line__WEBPACK_IMPORTED_MODULE_3__["default"](this._B, new _vector__WEBPACK_IMPORTED_MODULE_2__["default"](this._A, this._C).normal()),
3524
- 'C': new _line__WEBPACK_IMPORTED_MODULE_3__["default"](this._C, new _vector__WEBPACK_IMPORTED_MODULE_2__["default"](this._A, this._B).normal()),
3654
+ 'A': new _line__WEBPACK_IMPORTED_MODULE_3__.Line(this._A, new _vector__WEBPACK_IMPORTED_MODULE_2__.Vector(this._B, this._C).normal()),
3655
+ 'B': new _line__WEBPACK_IMPORTED_MODULE_3__.Line(this._B, new _vector__WEBPACK_IMPORTED_MODULE_2__.Vector(this._A, this._C).normal()),
3656
+ 'C': new _line__WEBPACK_IMPORTED_MODULE_3__.Line(this._C, new _vector__WEBPACK_IMPORTED_MODULE_2__.Vector(this._A, this._B).normal()),
3525
3657
  'intersection': null
3526
3658
  },
3527
3659
  'bisectors': {
@@ -3551,7 +3683,7 @@ class Triangle {
3551
3683
  d1 = tlines.BC;
3552
3684
  d2 = tlines.AC;
3553
3685
  }
3554
- let b1 = new _line__WEBPACK_IMPORTED_MODULE_3__["default"](new _algebra_equation__WEBPACK_IMPORTED_MODULE_4__["default"](d1.equation.left.clone().multiply(d2.n.simplify().norm), d2.equation.left.clone().multiply(d1.n.simplify().norm)).reorder(true).simplify()), b2 = new _line__WEBPACK_IMPORTED_MODULE_3__["default"](new _algebra_equation__WEBPACK_IMPORTED_MODULE_4__["default"](d1.equation.left.clone().multiply(d2.n.simplify().norm), d2.equation.left.clone().multiply(d1.n.simplify().norm).opposed()).reorder(true).simplify());
3686
+ let b1 = new _line__WEBPACK_IMPORTED_MODULE_3__.Line(new _algebra_equation__WEBPACK_IMPORTED_MODULE_4__.Equation(d1.equation.left.clone().multiply(d2.n.simplify().norm), d2.equation.left.clone().multiply(d1.n.simplify().norm)).reorder(true).simplify()), b2 = new _line__WEBPACK_IMPORTED_MODULE_3__.Line(new _algebra_equation__WEBPACK_IMPORTED_MODULE_4__.Equation(d1.equation.left.clone().multiply(d2.n.simplify().norm), d2.equation.left.clone().multiply(d1.n.simplify().norm).opposed()).reorder(true).simplify());
3555
3687
  if (pt === 'A') {
3556
3688
  return b1.hitSegment(this.B, this.C) ? b1 : b2;
3557
3689
  }
@@ -3576,7 +3708,7 @@ class Triangle {
3576
3708
 
3577
3709
  __webpack_require__.r(__webpack_exports__);
3578
3710
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3579
- /* harmony export */ "default": () => (/* binding */ Vector)
3711
+ /* harmony export */ "Vector": () => (/* binding */ Vector)
3580
3712
  /* harmony export */ });
3581
3713
  /* harmony import */ var _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../coefficients/fraction */ "./src/maths/coefficients/fraction.ts");
3582
3714
  /* harmony import */ var _numeric__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../numeric */ "./src/maths/numeric.ts");
@@ -3586,8 +3718,8 @@ class Vector {
3586
3718
  _x;
3587
3719
  _y;
3588
3720
  constructor(...values) {
3589
- this._x = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"]().zero();
3590
- this._y = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"]().zero();
3721
+ this._x = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction().zero();
3722
+ this._y = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction().zero();
3591
3723
  if (values !== undefined) {
3592
3724
  this.parse(...values);
3593
3725
  }
@@ -3637,10 +3769,10 @@ class Vector {
3637
3769
  return this;
3638
3770
  }
3639
3771
  if (values[0].isFraction || !isNaN(values[0])) {
3640
- this._x = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"](values[0]);
3772
+ this._x = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction(values[0]);
3641
3773
  }
3642
3774
  if (values[1].isFraction || !isNaN(values[1])) {
3643
- this._y = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"](values[1]);
3775
+ this._y = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction(values[1]);
3644
3776
  }
3645
3777
  }
3646
3778
  return this;
@@ -3662,19 +3794,19 @@ class Vector {
3662
3794
  };
3663
3795
  zero = () => {
3664
3796
  this.reset();
3665
- this._x = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"](null);
3666
- this._y = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"](null);
3797
+ this._x = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction(null);
3798
+ this._y = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction(null);
3667
3799
  return this;
3668
3800
  };
3669
3801
  one = () => {
3670
- this._x = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"]();
3671
- this._y = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"]();
3802
+ this._x = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction();
3803
+ this._y = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction();
3672
3804
  return this;
3673
3805
  };
3674
3806
  _parseString = (value) => {
3675
3807
  let components = value.split(/[,;\s]/g);
3676
- this.x = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"](components[0] || null);
3677
- this.y = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"](components[1] || null);
3808
+ this.x = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction(components[0] || null);
3809
+ this.y = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction(components[1] || null);
3678
3810
  return this;
3679
3811
  };
3680
3812
  opposed = () => {
@@ -3706,17 +3838,17 @@ class Vector {
3706
3838
  return this.scalarProductWithVector(v).isZero();
3707
3839
  };
3708
3840
  multiplyByScalar = (k) => {
3709
- let scalar = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"](k);
3841
+ let scalar = new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction(k);
3710
3842
  this._x.multiply(scalar);
3711
3843
  this._y.multiply(scalar);
3712
3844
  return this;
3713
3845
  };
3714
3846
  divideByScalar = (k) => {
3715
- return this.multiplyByScalar(new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__["default"](k).invert());
3847
+ return this.multiplyByScalar(new _coefficients_fraction__WEBPACK_IMPORTED_MODULE_0__.Fraction(k).invert());
3716
3848
  };
3717
3849
  simplify = () => {
3718
- return this.multiplyByScalar(_numeric__WEBPACK_IMPORTED_MODULE_1__["default"].lcm(this._x.denominator, this._y.denominator))
3719
- .divideByScalar(_numeric__WEBPACK_IMPORTED_MODULE_1__["default"].gcd(this._x.numerator, this._y.numerator));
3850
+ return this.multiplyByScalar(_numeric__WEBPACK_IMPORTED_MODULE_1__.Numeric.lcm(this._x.denominator, this._y.denominator))
3851
+ .divideByScalar(_numeric__WEBPACK_IMPORTED_MODULE_1__.Numeric.gcd(this._x.numerator, this._y.numerator));
3720
3852
  };
3721
3853
  angleWith = (V, sharp, radian) => {
3722
3854
  let scalar = this.scalarProductWithVector(V).value, toDegree = radian ? 1 : 180 / Math.PI;
@@ -3738,7 +3870,7 @@ class Vector {
3738
3870
 
3739
3871
  __webpack_require__.r(__webpack_exports__);
3740
3872
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3741
- /* harmony export */ "default": () => (/* binding */ Numeric)
3873
+ /* harmony export */ "Numeric": () => (/* binding */ Numeric)
3742
3874
  /* harmony export */ });
3743
3875
  class Numeric {
3744
3876
  static round(value, decimals = 2) {
@@ -3805,10 +3937,10 @@ class Numeric {
3805
3937
 
3806
3938
  /***/ }),
3807
3939
 
3808
- /***/ "./src/maths/random/random.ts":
3809
- /*!************************************!*\
3810
- !*** ./src/maths/random/random.ts ***!
3811
- \************************************/
3940
+ /***/ "./src/maths/random/index.ts":
3941
+ /*!***********************************!*\
3942
+ !*** ./src/maths/random/index.ts ***!
3943
+ \***********************************/
3812
3944
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
3813
3945
 
3814
3946
  __webpack_require__.r(__webpack_exports__);
@@ -3818,30 +3950,32 @@ __webpack_require__.r(__webpack_exports__);
3818
3950
  /* harmony import */ var _rndPolynom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./rndPolynom */ "./src/maths/random/rndPolynom.ts");
3819
3951
  /* harmony import */ var _rndMonom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rndMonom */ "./src/maths/random/rndMonom.ts");
3820
3952
  /* harmony import */ var _rndHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./rndHelpers */ "./src/maths/random/rndHelpers.ts");
3953
+ /* harmony import */ var _rndTypes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./rndTypes */ "./src/maths/random/rndTypes.ts");
3954
+
3821
3955
 
3822
3956
 
3823
3957
 
3824
3958
  var Random;
3825
3959
  (function (Random) {
3826
3960
  function polynom(config) {
3827
- return new _rndPolynom__WEBPACK_IMPORTED_MODULE_0__["default"](config).generate();
3961
+ return (new _rndPolynom__WEBPACK_IMPORTED_MODULE_0__.rndPolynom(config)).generate();
3828
3962
  }
3829
3963
  Random.polynom = polynom;
3830
3964
  function monom(config) {
3831
- return new _rndMonom__WEBPACK_IMPORTED_MODULE_1__["default"](config).generate();
3965
+ return (new _rndMonom__WEBPACK_IMPORTED_MODULE_1__.rndMonom(config)).generate();
3832
3966
  }
3833
3967
  Random.monom = monom;
3834
- function number(from, to) { return _rndHelpers__WEBPACK_IMPORTED_MODULE_2__["default"].randomInt(from, to); }
3968
+ function number(from, to) { return _rndHelpers__WEBPACK_IMPORTED_MODULE_2__.rndHelpers.randomInt(from, to); }
3835
3969
  Random.number = number;
3836
- function numberSym(max, allowZero) { return _rndHelpers__WEBPACK_IMPORTED_MODULE_2__["default"].randomIntSym(max, allowZero); }
3970
+ function numberSym(max, allowZero) { return _rndHelpers__WEBPACK_IMPORTED_MODULE_2__.rndHelpers.randomIntSym(max, allowZero); }
3837
3971
  Random.numberSym = numberSym;
3838
- function bool(percent) { return _rndHelpers__WEBPACK_IMPORTED_MODULE_2__["default"].randomBool(percent); }
3972
+ function bool(percent) { return _rndHelpers__WEBPACK_IMPORTED_MODULE_2__.rndHelpers.randomBool(percent); }
3839
3973
  Random.bool = bool;
3840
- function array(arr, number) { return _rndHelpers__WEBPACK_IMPORTED_MODULE_2__["default"].randomArray(arr, number); }
3974
+ function array(arr, number) { return _rndHelpers__WEBPACK_IMPORTED_MODULE_2__.rndHelpers.randomArray(arr, number); }
3841
3975
  Random.array = array;
3842
- function item(arr) { return _rndHelpers__WEBPACK_IMPORTED_MODULE_2__["default"].randomItem(arr); }
3976
+ function item(arr) { return _rndHelpers__WEBPACK_IMPORTED_MODULE_2__.rndHelpers.randomItem(arr); }
3843
3977
  Random.item = item;
3844
- function shuffle(arr) { _rndHelpers__WEBPACK_IMPORTED_MODULE_2__["default"].shuffleArray(arr); }
3978
+ function shuffle(arr) { _rndHelpers__WEBPACK_IMPORTED_MODULE_2__.rndHelpers.shuffleArray(arr); }
3845
3979
  Random.shuffle = shuffle;
3846
3980
  })(Random || (Random = {}));
3847
3981
 
@@ -3856,7 +3990,7 @@ var Random;
3856
3990
 
3857
3991
  __webpack_require__.r(__webpack_exports__);
3858
3992
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3859
- /* harmony export */ "default": () => (/* binding */ randomCore)
3993
+ /* harmony export */ "randomCore": () => (/* binding */ randomCore)
3860
3994
  /* harmony export */ });
3861
3995
  class randomCore {
3862
3996
  _config;
@@ -3887,7 +4021,7 @@ class randomCore {
3887
4021
 
3888
4022
  __webpack_require__.r(__webpack_exports__);
3889
4023
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3890
- /* harmony export */ "default": () => (/* binding */ rndHelpers)
4024
+ /* harmony export */ "rndHelpers": () => (/* binding */ rndHelpers)
3891
4025
  /* harmony export */ });
3892
4026
  class rndHelpers {
3893
4027
  static randomBool(percent = 0.5) {
@@ -3945,15 +4079,15 @@ class rndHelpers {
3945
4079
 
3946
4080
  __webpack_require__.r(__webpack_exports__);
3947
4081
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3948
- /* harmony export */ "default": () => (/* binding */ rndMonom)
4082
+ /* harmony export */ "rndMonom": () => (/* binding */ rndMonom)
3949
4083
  /* harmony export */ });
3950
4084
  /* harmony import */ var _randomCore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./randomCore */ "./src/maths/random/randomCore.ts");
3951
- /* harmony import */ var _random__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./random */ "./src/maths/random/random.ts");
4085
+ /* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index */ "./src/maths/random/index.ts");
3952
4086
  /* harmony import */ var _algebra_monom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../algebra/monom */ "./src/maths/algebra/monom.ts");
3953
4087
 
3954
4088
 
3955
4089
 
3956
- class rndMonom extends _randomCore__WEBPACK_IMPORTED_MODULE_0__["default"] {
4090
+ class rndMonom extends _randomCore__WEBPACK_IMPORTED_MODULE_0__.randomCore {
3957
4091
  constructor(userConfig) {
3958
4092
  super();
3959
4093
  this._defaultConfig = {
@@ -3965,14 +4099,14 @@ class rndMonom extends _randomCore__WEBPACK_IMPORTED_MODULE_0__["default"] {
3965
4099
  this._config = this.mergeConfig(userConfig, this._defaultConfig);
3966
4100
  }
3967
4101
  generate = () => {
3968
- let M = new _algebra_monom__WEBPACK_IMPORTED_MODULE_2__["default"]();
3969
- M.coefficient.parse(_random__WEBPACK_IMPORTED_MODULE_1__.Random.numberSym(10, this._config.zero), (this._config.fraction) ? _random__WEBPACK_IMPORTED_MODULE_1__.Random.number(1, 10) : 1).reduce();
4102
+ let M = new _algebra_monom__WEBPACK_IMPORTED_MODULE_2__.Monom();
4103
+ M.coefficient.parse(_index__WEBPACK_IMPORTED_MODULE_1__.Random.numberSym(10, this._config.zero), (this._config.fraction) ? _index__WEBPACK_IMPORTED_MODULE_1__.Random.number(1, 10) : 1).reduce();
3970
4104
  if (this._config.letters.length > 1) {
3971
4105
  for (let L of this._config.letters.split('')) {
3972
4106
  M.setLetter(L, 0);
3973
4107
  }
3974
4108
  for (let i = 0; i < this._config.degree; i++) {
3975
- const L = _random__WEBPACK_IMPORTED_MODULE_1__.Random.item(this._config.letters.split(""));
4109
+ const L = _index__WEBPACK_IMPORTED_MODULE_1__.Random.item(this._config.letters.split(""));
3976
4110
  M.setLetter(L, M.degree(L) + 1);
3977
4111
  }
3978
4112
  }
@@ -3994,17 +4128,17 @@ class rndMonom extends _randomCore__WEBPACK_IMPORTED_MODULE_0__["default"] {
3994
4128
 
3995
4129
  __webpack_require__.r(__webpack_exports__);
3996
4130
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3997
- /* harmony export */ "default": () => (/* binding */ rndPolynom)
4131
+ /* harmony export */ "rndPolynom": () => (/* binding */ rndPolynom)
3998
4132
  /* harmony export */ });
3999
4133
  /* harmony import */ var _randomCore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./randomCore */ "./src/maths/random/randomCore.ts");
4000
4134
  /* harmony import */ var _rndMonom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rndMonom */ "./src/maths/random/rndMonom.ts");
4001
- /* harmony import */ var _random__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./random */ "./src/maths/random/random.ts");
4002
- /* harmony import */ var _algebra_polynom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../algebra/polynom */ "./src/maths/algebra/polynom.ts");
4135
+ /* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index */ "./src/maths/random/index.ts");
4136
+ /* harmony import */ var _algebra__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../algebra */ "./src/maths/algebra/index.ts");
4003
4137
 
4004
4138
 
4005
4139
 
4006
4140
 
4007
- class rndPolynom extends _randomCore__WEBPACK_IMPORTED_MODULE_0__["default"] {
4141
+ class rndPolynom extends _randomCore__WEBPACK_IMPORTED_MODULE_0__.randomCore {
4008
4142
  constructor(userConfig) {
4009
4143
  super();
4010
4144
  this._defaultConfig = {
@@ -4020,9 +4154,12 @@ class rndPolynom extends _randomCore__WEBPACK_IMPORTED_MODULE_0__["default"] {
4020
4154
  this._config = this.mergeConfig(userConfig, this._defaultConfig);
4021
4155
  }
4022
4156
  generate = () => {
4023
- let P = new _algebra_polynom__WEBPACK_IMPORTED_MODULE_3__["default"]().empty(), M;
4157
+ if (this._config.factorable && this._config.degree > 1) {
4158
+ return this.factorable();
4159
+ }
4160
+ let P = new _algebra__WEBPACK_IMPORTED_MODULE_3__.Polynom().empty(), M;
4024
4161
  for (let i = this._config.degree; i >= 0; i--) {
4025
- M = new _rndMonom__WEBPACK_IMPORTED_MODULE_1__["default"]({
4162
+ M = new _rndMonom__WEBPACK_IMPORTED_MODULE_1__.rndMonom({
4026
4163
  letters: this._config.letters,
4027
4164
  degree: i,
4028
4165
  fraction: this._config.fraction,
@@ -4035,17 +4172,35 @@ class rndPolynom extends _randomCore__WEBPACK_IMPORTED_MODULE_0__["default"] {
4035
4172
  }
4036
4173
  if (this._config.numberOfMonoms > 0 && this._config.numberOfMonoms < P.length) {
4037
4174
  console.log(P.monoms.length);
4038
- P.monoms = _random__WEBPACK_IMPORTED_MODULE_2__.Random.array(P.monoms, this._config.numberOfMonoms);
4175
+ P.monoms = _index__WEBPACK_IMPORTED_MODULE_2__.Random.array(P.monoms, this._config.numberOfMonoms);
4039
4176
  }
4040
4177
  return P;
4041
4178
  };
4042
4179
  factorable = () => {
4043
- let P = new _algebra_polynom__WEBPACK_IMPORTED_MODULE_3__["default"]();
4180
+ let P = new _algebra__WEBPACK_IMPORTED_MODULE_3__.Polynom().one();
4181
+ let _factorableConfig = { ...this._config };
4182
+ _factorableConfig.degree = 1;
4183
+ _factorableConfig.factorable = false;
4184
+ for (let i = 0; i < this._config.degree; i++) {
4185
+ P.multiply(_index__WEBPACK_IMPORTED_MODULE_2__.Random.polynom(_factorableConfig));
4186
+ }
4044
4187
  return P;
4045
4188
  };
4046
4189
  }
4047
4190
 
4048
4191
 
4192
+ /***/ }),
4193
+
4194
+ /***/ "./src/maths/random/rndTypes.ts":
4195
+ /*!**************************************!*\
4196
+ !*** ./src/maths/random/rndTypes.ts ***!
4197
+ \**************************************/
4198
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
4199
+
4200
+ __webpack_require__.r(__webpack_exports__);
4201
+
4202
+
4203
+
4049
4204
  /***/ }),
4050
4205
 
4051
4206
  /***/ "./src/maths/shutingyard.ts":
@@ -4056,7 +4211,7 @@ class rndPolynom extends _randomCore__WEBPACK_IMPORTED_MODULE_0__["default"] {
4056
4211
 
4057
4212
  __webpack_require__.r(__webpack_exports__);
4058
4213
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4059
- /* harmony export */ "default": () => (/* binding */ Shutingyard)
4214
+ /* harmony export */ "Shutingyard": () => (/* binding */ Shutingyard)
4060
4215
  /* harmony export */ });
4061
4216
  class Shutingyard {
4062
4217
  _rpn = [];
@@ -4356,30 +4511,10 @@ var __webpack_exports__ = {};
4356
4511
  __webpack_require__.r(__webpack_exports__);
4357
4512
  /* harmony import */ var _maths_numeric__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./maths/numeric */ "./src/maths/numeric.ts");
4358
4513
  /* harmony import */ var _maths_shutingyard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./maths/shutingyard */ "./src/maths/shutingyard.ts");
4359
- /* harmony import */ var _maths_coefficients_fraction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./maths/coefficients/fraction */ "./src/maths/coefficients/fraction.ts");
4360
- /* harmony import */ var _maths_coefficients_nthroot__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./maths/coefficients/nthroot */ "./src/maths/coefficients/nthroot.ts");
4361
- /* harmony import */ var _maths_algebra_monom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./maths/algebra/monom */ "./src/maths/algebra/monom.ts");
4362
- /* harmony import */ var _maths_algebra_polynom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./maths/algebra/polynom */ "./src/maths/algebra/polynom.ts");
4363
- /* harmony import */ var _maths_algebra_equation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./maths/algebra/equation */ "./src/maths/algebra/equation.ts");
4364
- /* harmony import */ var _maths_algebra_linearSystem__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./maths/algebra/linearSystem */ "./src/maths/algebra/linearSystem.ts");
4365
- /* harmony import */ var _maths_geometry_line__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./maths/geometry/line */ "./src/maths/geometry/line.ts");
4366
- /* harmony import */ var _maths_geometry_circle__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./maths/geometry/circle */ "./src/maths/geometry/circle.ts");
4367
- /* harmony import */ var _maths_algebra_logicalset__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./maths/algebra/logicalset */ "./src/maths/algebra/logicalset.ts");
4368
- /* harmony import */ var _maths_algebra_rational__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./maths/algebra/rational */ "./src/maths/algebra/rational.ts");
4369
- /* harmony import */ var _maths_random_random__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./maths/random/random */ "./src/maths/random/random.ts");
4370
- /* harmony import */ var _maths_geometry_triangle__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./maths/geometry/triangle */ "./src/maths/geometry/triangle.ts");
4371
- /* harmony import */ var _maths_geometry_point__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./maths/geometry/point */ "./src/maths/geometry/point.ts");
4372
- /* harmony import */ var _maths_geometry_vector__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./maths/geometry/vector */ "./src/maths/geometry/vector.ts");
4373
-
4374
-
4375
-
4376
-
4377
-
4378
-
4379
-
4380
-
4381
-
4382
-
4514
+ /* harmony import */ var _maths_random__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./maths/random */ "./src/maths/random/index.ts");
4515
+ /* harmony import */ var _maths_coefficients__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./maths/coefficients */ "./src/maths/coefficients/index.ts");
4516
+ /* harmony import */ var _maths_algebra__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./maths/algebra */ "./src/maths/algebra/index.ts");
4517
+ /* harmony import */ var _maths_geometry__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./maths/geometry */ "./src/maths/geometry/index.ts");
4383
4518
 
4384
4519
 
4385
4520
 
@@ -4387,23 +4522,23 @@ __webpack_require__.r(__webpack_exports__);
4387
4522
 
4388
4523
 
4389
4524
  window.Pi = {
4390
- ShutingYard: _maths_shutingyard__WEBPACK_IMPORTED_MODULE_1__["default"],
4391
- Numeric: _maths_numeric__WEBPACK_IMPORTED_MODULE_0__["default"],
4392
- Fraction: _maths_coefficients_fraction__WEBPACK_IMPORTED_MODULE_2__["default"],
4393
- Root: _maths_coefficients_nthroot__WEBPACK_IMPORTED_MODULE_3__["default"],
4394
- Monom: _maths_algebra_monom__WEBPACK_IMPORTED_MODULE_4__["default"],
4395
- Polynom: _maths_algebra_polynom__WEBPACK_IMPORTED_MODULE_5__["default"],
4396
- Equation: _maths_algebra_equation__WEBPACK_IMPORTED_MODULE_6__["default"],
4397
- LinearSystem: _maths_algebra_linearSystem__WEBPACK_IMPORTED_MODULE_7__["default"],
4398
- Rational: _maths_algebra_rational__WEBPACK_IMPORTED_MODULE_11__["default"],
4399
- Logicalset: _maths_algebra_logicalset__WEBPACK_IMPORTED_MODULE_10__["default"],
4400
- Random: _maths_random_random__WEBPACK_IMPORTED_MODULE_12__.Random,
4525
+ ShutingYard: _maths_shutingyard__WEBPACK_IMPORTED_MODULE_1__.Shutingyard,
4526
+ Numeric: _maths_numeric__WEBPACK_IMPORTED_MODULE_0__.Numeric,
4527
+ Fraction: _maths_coefficients__WEBPACK_IMPORTED_MODULE_3__.Fraction,
4528
+ Root: _maths_coefficients__WEBPACK_IMPORTED_MODULE_3__.Nthroot,
4529
+ Monom: _maths_algebra__WEBPACK_IMPORTED_MODULE_4__.Monom,
4530
+ Polynom: _maths_algebra__WEBPACK_IMPORTED_MODULE_4__.Polynom,
4531
+ Equation: _maths_algebra__WEBPACK_IMPORTED_MODULE_4__.Equation,
4532
+ LinearSystem: _maths_algebra__WEBPACK_IMPORTED_MODULE_4__.LinearSystem,
4533
+ Rational: _maths_algebra__WEBPACK_IMPORTED_MODULE_4__.Rational,
4534
+ Logicalset: _maths_algebra__WEBPACK_IMPORTED_MODULE_4__.Logicalset,
4535
+ Random: _maths_random__WEBPACK_IMPORTED_MODULE_2__.Random,
4401
4536
  Geometry: {
4402
- Vector: _maths_geometry_vector__WEBPACK_IMPORTED_MODULE_15__["default"],
4403
- Point: _maths_geometry_point__WEBPACK_IMPORTED_MODULE_14__["default"],
4404
- Line: _maths_geometry_line__WEBPACK_IMPORTED_MODULE_8__["default"],
4405
- Triangle: _maths_geometry_triangle__WEBPACK_IMPORTED_MODULE_13__["default"],
4406
- Circle: _maths_geometry_circle__WEBPACK_IMPORTED_MODULE_9__["default"]
4537
+ Vector: _maths_geometry__WEBPACK_IMPORTED_MODULE_5__.Vector,
4538
+ Point: _maths_geometry__WEBPACK_IMPORTED_MODULE_5__.Point,
4539
+ Line: _maths_geometry__WEBPACK_IMPORTED_MODULE_5__.Line,
4540
+ Triangle: _maths_geometry__WEBPACK_IMPORTED_MODULE_5__.Triangle,
4541
+ Circle: _maths_geometry__WEBPACK_IMPORTED_MODULE_5__.Circle
4407
4542
  }
4408
4543
  };
4409
4544