Skip to content

Commit

Permalink
Omit flickering solar panel max energy, see #307
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisklus committed Feb 12, 2020
1 parent 5a0799f commit 11ece37
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/systems/model/SolarPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ define( require => {
const NumberProperty = require( 'AXON/NumberProperty' );
const Matrix3 = require( 'DOT/Matrix3' );
const Shape = require( 'KITE/Shape' );
const Utils = require( 'DOT/Utils' );
const Vector2 = require( 'DOT/Vector2' );

// images
Expand Down Expand Up @@ -180,7 +181,7 @@ define( require => {
// panel (this way, the fan moves at the same speed when chunks are on or off).
energyProduced = incomingEnergy.amount * 0.68;
}
this.energyOutputRateProperty.value = energyProduced / dt;
this.energyOutputRateProperty.value = Utils.toFixedNumber( energyProduced / dt, 11 );

this.simulationTime += dt;

Expand Down

0 comments on commit 11ece37

Please sign in to comment.