Skip to content

Commit

Permalink
Add space between line comments, see #30
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Feb 28, 2018
1 parent b592b90 commit fb27f40
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion js/model/ISLCModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ define( function( require ) {
return inherit( Object, ISLCModel, {

/**
* Step function makes sure masses doesn't goes out of bounds and don't overlap each other at each time step
* Step function makes sure masses doesn't goes out of bounds and don't overlap each other at each time step.
*
* @public
*/
step: function() {
Expand Down Expand Up @@ -163,19 +164,23 @@ define( function( require ) {
this.object2.positionProperty.set( locationMass2 );
}
else {

// neither object is dragging, radius must have changed
if ( this.object1.radiusLastChanged ) {
if ( locationMass2 !== maxX ) {

// object2 is not at the edge update its position
this.object2.positionProperty.set( locationMass2 );
}
else {

// object2 is at the edge update object1 position
this.object1.positionProperty.set( locationMass1 );
}
}
else if ( this.object2.radiusLastChanged ) {
if ( locationMass1 !== minX ) {

// object1 is not at boundary, update position
this.object1.positionProperty.set( locationMass1 );
}
Expand Down

0 comments on commit fb27f40

Please sign in to comment.