pimath 0.1.38 → 0.1.39

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/pimath.js CHANGED
@@ -238,8 +238,8 @@ class a {
238
238
  infinite = () => (this.#t = 1 / 0, this.#e = 1, this);
239
239
  invalid = () => (this.#t = NaN, this.#e = 1, this);
240
240
  inverse = () => {
241
- const e = +this.#t;
242
- return this.#t = +this.#e, this.#e = e, this;
241
+ const e = this.sign(), t = Math.abs(this.#t);
242
+ return this.#t = Math.abs(this.#e) * e, this.#e = t, this;
243
243
  };
244
244
  isApproximative = () => this.#i || this.#t.toString().length >= 15 && this.#e.toString().length >= 15;
245
245
  isEqual = (e) => this.compare(e, "=");