From 8c8ad532f4e0ec5ea34ffe9617c9407eb0dc2bdd Mon Sep 17 00:00:00 2001 From: Hixie Date: Thu, 9 Apr 2015 16:03:09 -0700 Subject: [PATCH] [Effen] fix typo in animation code (impluse => impulse) R=eseidel@chromium.org Review URL: https://codereview.chromium.org/1076963002 --- framework/animation/mechanics.dart | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/framework/animation/mechanics.dart b/framework/animation/mechanics.dart index 5df2833619d..656d7582519 100644 --- a/framework/animation/mechanics.dart +++ b/framework/animation/mechanics.dart @@ -17,8 +17,8 @@ class Particle extends System { Particle({this.mass: 1.0, this.velocity: 0.0, this.position: 0.0}); - void applyImpluse(double impluse) { - velocity += impluse / mass; + void applyImpulse(double impulse) { + velocity += impulse / mass; } void update(double deltaT) { @@ -78,7 +78,7 @@ class ParticleInBoxWithFriction extends ParticleInBox { void update(double deltaT) { double force = -_sign * friction; - particle.applyImpluse(force * deltaT); + particle.applyImpulse(force * deltaT); if (particle.velocity.sign != _sign) particle.velocity = 0.0; super.update(deltaT); @@ -104,7 +104,7 @@ class ParticleAndSpringInBox extends System { } void update(double deltaT) { - particle.applyImpluse(spring.force * deltaT); + particle.applyImpulse(spring.force * deltaT); particle.update(deltaT); _applyInvariants(); } @@ -132,11 +132,11 @@ class ParticleClimbingRamp extends System { void update(double deltaT) { particle.update(deltaT); - // Note that we apply the impluse from gravity after updating the particle's + // Note that we apply the impulse from gravity after updating the particle's // position so that we overestimate the distance traveled by the particle. // That ensures that we actually hit the edge of the box and don't wind up // reversing course. - particle.applyImpluse(kGravity * slope * deltaT); + particle.applyImpulse(kGravity * slope * deltaT); box.confine(particle); } }