Skip to content

Commit

Permalink
format with PhET style
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Nov 9, 2015
1 parent 1becc42 commit 73ef7ce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions js/gravity-and-orbits/module/ModeConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ define( function( require ) {
var deltaVelocity = this.getTotalMomentum().times( -1.0 / this.getTotalMass() );
var bodies = this.getBodies();
for ( var i = 0; i < bodies.length; i++ ) {
bodies[i].vx += deltaVelocity.x;
bodies[i].vy += deltaVelocity.y;
bodies[ i ].vx += deltaVelocity.x;
bodies[ i ].vy += deltaVelocity.y;
}
},

Expand All @@ -51,7 +51,7 @@ define( function( require ) {
var totalMomentum = new Vector2();
var bodies = this.getBodies();
for ( var i = 0; i < bodies.length; i++ ) {
totalMomentum = totalMomentum.plus( bodies[i].getMomentum() );
totalMomentum = totalMomentum.plus( bodies[ i ].getMomentum() );
}
return totalMomentum;
},
Expand All @@ -64,7 +64,7 @@ define( function( require ) {
var totalMass = 0.0;
var bodies = this.getBodies();
for ( var i = 0; i < bodies.length; i++ ) {
totalMass += bodies[i].mass;
totalMass += bodies[ i ].mass;
}
return totalMass;
},
Expand Down

0 comments on commit 73ef7ce

Please sign in to comment.