pimath 0.0.52 → 0.0.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/pi.js CHANGED
@@ -497,12 +497,12 @@ class Equation {
497
497
  else {
498
498
  this._solutions = [
499
499
  {
500
- tex: `\\dfrac{${-b / gcd} - ${nthDelta.tex} }{ ${2 * a / gcd} }`,
500
+ tex: `\\frac{${-b / gcd} - ${nthDelta.tex} }{ ${2 * a / gcd} }`,
501
501
  value: realX1,
502
502
  exact: false
503
503
  },
504
504
  {
505
- tex: `\\dfrac{${-b / gcd} + ${nthDelta.tex} }{ ${2 * a / gcd} }`,
505
+ tex: `\\frac{${-b / gcd} + ${nthDelta.tex} }{ ${2 * a / gcd} }`,
506
506
  value: realX2,
507
507
  exact: false
508
508
  },
@@ -527,12 +527,12 @@ class Equation {
527
527
  else {
528
528
  this._solutions = [
529
529
  {
530
- tex: `\\dfrac{- ${nthDelta.tex} }{ ${2 * a / gcd} }`,
530
+ tex: `\\frac{- ${nthDelta.tex} }{ ${2 * a / gcd} }`,
531
531
  value: realX1,
532
532
  exact: false
533
533
  },
534
534
  {
535
- tex: `\\dfrac{${nthDelta.tex} }{ ${2 * a / gcd} }`,
535
+ tex: `\\frac{${nthDelta.tex} }{ ${2 * a / gcd} }`,
536
536
  value: realX2,
537
537
  exact: false
538
538
  },
@@ -545,12 +545,12 @@ class Equation {
545
545
  const S1 = new fraction_1.Fraction(-b - nthDelta.coefficient, 2 * a).reduce(), S2 = new fraction_1.Fraction(-b + nthDelta.coefficient, 2 * a).reduce();
546
546
  this._solutions = [
547
547
  {
548
- tex: S1.dfrac,
548
+ tex: S1.frac,
549
549
  value: realX1,
550
550
  exact: S1
551
551
  },
552
552
  {
553
- tex: S2.dfrac,
553
+ tex: S2.frac,
554
554
  value: realX2,
555
555
  exact: S2
556
556
  }
@@ -561,7 +561,7 @@ class Equation {
561
561
  else if (delta === 0) {
562
562
  const sol = new fraction_1.Fraction(-b, 2 * a).reduce();
563
563
  this._solutions = [{
564
- tex: sol.dfrac,
564
+ tex: sol.frac,
565
565
  value: sol.value,
566
566
  exact: sol
567
567
  }];
@@ -1017,7 +1017,7 @@ class LinearSystem {
1017
1017
  console.log(`Undefined (letter ${letter})`);
1018
1018
  return;
1019
1019
  }
1020
- tex.push(this._solutions[letter].value.dfrac);
1020
+ tex.push(this._solutions[letter].value.frac);
1021
1021
  }
1022
1022
  return `(${tex.join(';')})`;
1023
1023
  }
@@ -1943,7 +1943,7 @@ class Monom {
1943
1943
  if (L === '') {
1944
1944
  // No setLetter - means it's only a number !
1945
1945
  if (this._coefficient.value != 0) {
1946
- return `${this._coefficient.dfrac}`;
1946
+ return `${this._coefficient.frac}`;
1947
1947
  }
1948
1948
  else {
1949
1949
  return '0';
@@ -1960,7 +1960,7 @@ class Monom {
1960
1960
  return '0';
1961
1961
  }
1962
1962
  else {
1963
- return `${this._coefficient.dfrac}${L}`;
1963
+ return `${this._coefficient.frac}${L}`;
1964
1964
  }
1965
1965
  }
1966
1966
  }
@@ -3495,9 +3495,7 @@ class Rational {
3495
3495
  return tex;
3496
3496
  };
3497
3497
  this._makeOneLineOfTableOfSigns = (factor, zeroes, zeroSign) => {
3498
- let oneLine = [],
3499
- // TODO : check if there is no zero ?
3500
- currentZero = factor.getZeroes().map(x => x.tex);
3498
+ let oneLine = [], currentZero = factor.getZeroes().map(x => x.tex);
3501
3499
  // First +/- sign, before the first zero
3502
3500
  oneLine.push('');
3503
3501
  oneLine.push(factor.evaluate(zeroes[0].value - 1).sign() === 1 ? '+' : '-');
@@ -3525,10 +3523,10 @@ class Rational {
3525
3523
  return this._denominator;
3526
3524
  }
3527
3525
  get tex() {
3528
- return `\\dfrac{ ${this._numerator.tex} }{ ${this._denominator.tex} }`;
3526
+ return `\\frac{ ${this._numerator.tex} }{ ${this._denominator.tex} }`;
3529
3527
  }
3530
3528
  get texFactors() {
3531
- return `\\dfrac{ ${this._numerator.texFactors} }{ ${this._denominator.texFactors} }`;
3529
+ return `\\frac{ ${this._numerator.texFactors} }{ ${this._denominator.texFactors} }`;
3532
3530
  }
3533
3531
  }
3534
3532
  exports.Rational = Rational;
@@ -4468,7 +4466,7 @@ class PolynomExpProduct {
4468
4466
  }
4469
4467
  // restore all degrees to negative again.
4470
4468
  denominators.map(x => x.degree.opposed());
4471
- tex = `\\dfrac{ ${numeratorsAsTex.join(' \\cdot ')} }{ ${denominatorsAsTex.join(' \\cdot ')} }`;
4469
+ tex = `\\frac{ ${numeratorsAsTex.join(' \\cdot ')} }{ ${denominatorsAsTex.join(' \\cdot ')} }`;
4472
4470
  }
4473
4471
  }
4474
4472
  // Apply the modification
@@ -5384,7 +5382,7 @@ class Point {
5384
5382
  let V = new vector_1.Vector(this, item);
5385
5383
  value = V.norm;
5386
5384
  fraction = V.normSquare.sqrt();
5387
- tex = V.normSquare.isSquare() ? fraction.tex : `\\sqrt{\\dfrac{ ${V.normSquare.numerator} }{ ${V.normSquare.denominator} }}`;
5385
+ tex = V.normSquare.isSquare() ? fraction.tex : `\\sqrt{\\frac{ ${V.normSquare.numerator} }{ ${V.normSquare.denominator} }}`;
5388
5386
  }
5389
5387
  return { value, fraction, tex };
5390
5388
  };
@@ -6030,7 +6028,11 @@ exports.Numeric = Numeric;
6030
6028
 
6031
6029
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6032
6030
  if (k2 === undefined) k2 = k;
6033
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
6031
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6032
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6033
+ desc = { enumerable: true, get: function() { return m[k]; } };
6034
+ }
6035
+ Object.defineProperty(o, k2, desc);
6034
6036
  }) : (function(o, m, k, k2) {
6035
6037
  if (k2 === undefined) k2 = k;
6036
6038
  o[k2] = m[k];