Skip to content

Commit

Permalink
Renamed method, see #86
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Nov 4, 2017
1 parent 9899c5c commit 6a7c671
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/faradays-law/model/CoilModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ define( function( require ) {
this.BProperty.reset();
this.BLastProperty.reset();
this.emfProperty.reset();
this.calculateB();
this.updateMagneticField();
this.BLastProperty.set( this.BProperty.get() );
},

/**
* Calculate magnetic field with current magnet position
* @private
*/
calculateB: function() {
updateMagneticField: function() {
var rSquared = this.position.distanceSquared( this.magnetModel.positionProperty.get() ) / (this.A * this.A); // normalized squared distance from coil to magnet

// if magnet is very close to coil, then B field is at max value;
Expand All @@ -90,7 +90,7 @@ define( function( require ) {
* @public
*/
step: function( dt ) {
this.calculateB();
this.updateMagneticField();

// emf = (nbr coils)*(change in B)/(change in t)
this.emfProperty.set( this.N * (this.BProperty.get() - this.BLastProperty.get()) / dt );
Expand Down

0 comments on commit 6a7c671

Please sign in to comment.