pimath 0.0.71 → 0.0.72

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/.idea/misc.xml CHANGED
@@ -3,9 +3,4 @@
3
3
  <component name="JavaScriptSettings">
4
4
  <option name="languageLevel" value="ES6" />
5
5
  </component>
6
- <component name="SwUserDefinedSpecifications">
7
- <option name="specTypeByUrl">
8
- <map />
9
- </option>
10
- </component>
11
6
  </project>
package/dist/pi.js CHANGED
@@ -4120,6 +4120,17 @@ class Fraction {
4120
4120
  this._denominator = this._denominator * Q.denominator;
4121
4121
  return this.reduce();
4122
4122
  };
4123
+ this.xMultiply = (...values) => {
4124
+ // Parse the value.
4125
+ // If it's a fraction, return a clone of it
4126
+ // If it's an integer, return the fraction F/1
4127
+ for (let value of values) {
4128
+ let F = new Fraction(value);
4129
+ this._numerator = this._numerator * F.numerator;
4130
+ this._denominator = this._denominator * F.denominator;
4131
+ }
4132
+ return this;
4133
+ };
4123
4134
  this.divide = (F) => {
4124
4135
  let Q = new Fraction(F);
4125
4136
  if (Q.numerator === 0) {