Tab pointed out a typo that made the overdamped case fail.
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 Jun 2016 21:50:40 +0000 (21:50 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 Jun 2016 21:50:40 +0000 (21:50 +0000)
* demos/spring/spring.js:
(SpringSolver.prototype.solve):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@202709 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Websites/webkit.org/ChangeLog
Websites/webkit.org/demos/spring/spring.js

index 4ed2659..d6761ec 100644 (file)
@@ -1,5 +1,12 @@
 2016-06-30  Dean Jackson  <dino@apple.com>
 
+        Tab pointed out a typo that made the overdamped case fail.
+
+        * demos/spring/spring.js:
+        (SpringSolver.prototype.solve):
+
+2016-06-30  Dean Jackson  <dino@apple.com>
+
         Fixed a typo in the link to the other version.
 
         * blog-files/color-gamut/index.html:
index 5253dc4..fd04996 100644 (file)
@@ -48,7 +48,7 @@ SpringSolver.prototype.solve = function (t)
         t = Math.exp(-t * this.m_zeta * this.m_w0) * (this.m_A * Math.cos(this.m_wd * t) + this.m_B * Math.sin(this.m_wd * t));
     } else {
         // Critically damped (ignoring over-damped case for now).
-        t = (this.m_A + thism_B * t) * Math.exp(-t * this.m_w0);
+        t = (this.m_A + this.m_B * t) * Math.exp(-t * this.m_w0);
     }
 
     // Map range from [1..0] to [0..1].