Skip to content

Commit

Permalink
when resistance less than 1, readout has 3 digits, see #125
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Feb 7, 2018
1 parent 0a1ce25 commit d71f16e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions js/resistance-in-a-wire/view/ControlPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ define( function( require ) {

var numDecimalDigits = resistance >= 100 ? 0 : // Over 100, show no decimal points, like 102
resistance >= 10 ? 1 : // between 10.0 and 99.9, show 2 decimal points
resistance < 1 ? 3 : // when less than 1, show 3 decimal places, see #125
2; // Numbers less than 10 show 2 decimal points, like 8.35

resistanceReadout.text = StringUtils.format(
Expand Down

0 comments on commit d71f16e

Please sign in to comment.