pimath 0.0.79 → 0.0.82
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/algebra/polynom.d.ts +1 -1
- package/esm/maths/algebra/polynom.js +3 -3
- package/esm/maths/algebra/polynom.js.map +1 -1
- package/package.json +1 -1
- package/src/maths/algebra/polynom.ts +3 -3
package/dist/pi.js
CHANGED
|
@@ -3191,7 +3191,7 @@ class Polynom {
|
|
|
3191
3191
|
}
|
|
3192
3192
|
return tex;
|
|
3193
3193
|
}
|
|
3194
|
-
get
|
|
3194
|
+
get displayFactors() {
|
|
3195
3195
|
this.factorize();
|
|
3196
3196
|
if (this.factors.length <= 1) {
|
|
3197
3197
|
return this.display;
|
|
@@ -3218,7 +3218,7 @@ class Polynom {
|
|
|
3218
3218
|
// Loop through all factors that contains at least 2 monoms.
|
|
3219
3219
|
for (let item of Object.values(factorsCount).filter(item => item.factor.monoms.length > 1)) {
|
|
3220
3220
|
if (item.factor.length > 1) {
|
|
3221
|
-
display +=
|
|
3221
|
+
display += `(${item.factor.display})${item.degree > 1 ? '^(' + item.degree + ')' : ''}`;
|
|
3222
3222
|
}
|
|
3223
3223
|
}
|
|
3224
3224
|
return display;
|
|
@@ -3269,7 +3269,7 @@ class Polynom {
|
|
|
3269
3269
|
_parseString(inputStr, ...values) {
|
|
3270
3270
|
if (values === undefined || values.length === 0) {
|
|
3271
3271
|
inputStr = '' + inputStr;
|
|
3272
|
-
this._rawString = inputStr;
|
|
3272
|
+
this._rawString = inputStr.trim().replaceAll(' ', '');
|
|
3273
3273
|
// Parse the polynom using the shutting yard algorithm
|
|
3274
3274
|
if (inputStr !== '' && !isNaN(Number(inputStr))) {
|
|
3275
3275
|
this.empty();
|