pimath 0.0.112 → 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 +4 -1
- 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/algebra/equation.js +1 -1
- package/esm/maths/algebra/equation.js.map +1 -1
- package/esm/maths/geometry/line.js +3 -0
- package/esm/maths/geometry/line.js.map +1 -1
- package/esm/maths/randomization/random.d.ts +1 -1
- package/esm/maths/randomization/random.js.map +1 -1
- package/package.json +1 -1
- package/src/maths/algebra/equation.ts +1 -1
- package/src/maths/geometry/line.ts +3 -0
- package/src/maths/randomization/random.ts +1 -1
- package/tests/geometry/line.test.ts +6 -9
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
|
|
219
|
+
return this;
|
|
220
220
|
};
|
|
221
221
|
/**
|
|
222
222
|
* divide an equation by a given value (transformed as a fraction)
|
|
@@ -6015,11 +6015,14 @@ 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
|
+
console.log('BEFORE', this.equation.tex);
|
|
6018
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,
|