pimath 0.0.103 → 0.0.104

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/dev/pi.js CHANGED
@@ -184,11 +184,12 @@ class Equation {
184
184
  // Start by moving everything to the left.
185
185
  this._left.subtract(this._right);
186
186
  this._right.zero();
187
- for (let m of this._left.monoms) {
187
+ let values = [...this._left.monoms];
188
+ for (let m of values) {
188
189
  if (!m.hasLetter(letter)) {
189
190
  mMove = m.clone();
190
- this._left.add(mMove.clone().opposed());
191
- this._right.add(mMove.clone().opposed());
191
+ this._left.subtract(mMove);
192
+ this._right.subtract(mMove);
192
193
  }
193
194
  }
194
195
  // In theory, we should have only one item on the left.