commit 16976ddad1175e2ca9bf70cdeb5d90a82d0560ee
parent d92e2c070fa9d57c675f6a18a431a041904dbc10
Author: AsherMorgan <59518073+AsherMorgan@users.noreply.github.com>
Date: Sun, 28 Feb 2021 16:49:28 -0800
Fix bug in atwood machine positions property
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/simulations/atwood-machine.js b/simulations/atwood-machine.js
@@ -39,7 +39,7 @@ const App = {
let position = 0.5 * this.acceleration * this.time * this.time;
if (position > 3) position = 3;
if (position < -3) position = -3;
- if (Math.abs(position) === 3) this.toggle();
+ if (Math.abs(position) === 3 && this.active) this.toggle();
return [position, -position];
},
},