pimath 0.0.111 → 0.0.112
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 +3 -3
- package/dist/pi.js.map +1 -1
- package/dist/pi.min.js +1 -1
- package/dist/pi.min.js.map +1 -1
- package/esm/maths/geometry/line.js +3 -3
- package/esm/maths/geometry/line.js.map +1 -1
- package/package.json +1 -1
- package/src/maths/geometry/line.ts +3 -3
- package/tests/geometry/line.test.ts +9 -0
package/dist/pi.js
CHANGED
|
@@ -6015,7 +6015,7 @@ 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().
|
|
6018
|
+
let canonical = this.equation.clone().reorder(true);
|
|
6019
6019
|
// Make sur the first item is positive.
|
|
6020
6020
|
if (this._a.isNegative()) {
|
|
6021
6021
|
canonical.multiply(-1);
|
|
@@ -6023,9 +6023,9 @@ class Line {
|
|
|
6023
6023
|
const d = this._d.clone().simplifyDirection();
|
|
6024
6024
|
return {
|
|
6025
6025
|
canonical: canonical.tex,
|
|
6026
|
+
equation: canonical.clone().reorder().tex,
|
|
6026
6027
|
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
|
|
6028
|
+
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
6029
|
};
|
|
6030
6030
|
}
|
|
6031
6031
|
get display() {
|