pimath 0.0.58 → 0.0.59
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 +5 -0
- 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/rational.d.ts +2 -0
- package/esm/maths/algebra/rational.js +5 -0
- package/esm/maths/algebra/rational.js.map +1 -1
- package/package.json +1 -1
- package/src/maths/algebra/rational.ts +9 -0
package/dist/pi.js
CHANGED
|
@@ -3572,6 +3572,11 @@ class Rational {
|
|
|
3572
3572
|
oneLine.push('');
|
|
3573
3573
|
return oneLine;
|
|
3574
3574
|
};
|
|
3575
|
+
this.evaluate = (values) => {
|
|
3576
|
+
const r = new fraction_1.Fraction().zero();
|
|
3577
|
+
let N = this._numerator.evaluate(values), D = this._numerator.evaluate(values);
|
|
3578
|
+
return N.divide(D);
|
|
3579
|
+
};
|
|
3575
3580
|
if (numerator instanceof polynom_1.Polynom) {
|
|
3576
3581
|
this._numerator = numerator.clone();
|
|
3577
3582
|
}
|