pimath 0.0.111 → 0.0.113

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
@@ -216,7 +216,7 @@ class Equation {
216
216
  if (this._sign !== '=' && F.sign() === -1) {
217
217
  this._reverseSign();
218
218
  }
219
- return this.reorder();
219
+ return this;
220
220
  };
221
221
  /**
222
222
  * divide an equation by a given value (transformed as a fraction)
@@ -6015,17 +6015,20 @@ class Line {
6015
6015
  // mxh => y = -a/b x - c/b
6016
6016
  // parametric => (xy) = OA + k*d
6017
6017
  // equation => ax + by = -c
6018
- let canonical = this.equation.clone().moveLeft();
6018
+ console.log('BEFORE', this.equation.tex);
6019
+ let canonical = this.equation.clone().reorder(true);
6020
+ console.log('CANONCIAL', canonical.tex);
6019
6021
  // Make sur the first item is positive.
6020
6022
  if (this._a.isNegative()) {
6021
6023
  canonical.multiply(-1);
6022
6024
  }
6025
+ console.log('CANONCIAL (multiply)', canonical.tex);
6023
6026
  const d = this._d.clone().simplifyDirection();
6024
6027
  return {
6025
6028
  canonical: canonical.tex,
6029
+ equation: canonical.clone().reorder().tex,
6026
6030
  mxh: this.slope.isInfinity() ? 'x=' + this.OA.x.tex : 'y=' + new polynom_1.Polynom().parse('x', this.slope, this.height).tex,
6027
- parametric: `${point_1.Point.pmatrix('x', 'y')} = ${point_1.Point.pmatrix(this._OA.x, this._OA.y)} + k\\cdot ${point_1.Point.pmatrix(d.x, d.y)}`,
6028
- equation: canonical.clone().reorder().tex
6031
+ parametric: `${point_1.Point.pmatrix('x', 'y')} = ${point_1.Point.pmatrix(this._OA.x, this._OA.y)} + k\\cdot ${point_1.Point.pmatrix(d.x, d.y)}`
6029
6032
  };
6030
6033
  }
6031
6034
  get display() {