Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(966)

Unified Diff: sky/framework/animation/mechanics.dart

Issue 1076963002: [Effen] fix typo in animation code (impluse => impulse) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/framework/animation/mechanics.dart
diff --git a/sky/framework/animation/mechanics.dart b/sky/framework/animation/mechanics.dart
index 5df2833619d7d30b781f040fe3cd7742fae0f4a3..656d75825199dc489614cb60680d85100288426f 100644
--- a/sky/framework/animation/mechanics.dart
+++ b/sky/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);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698