Skip to content

Commit

Permalink
add a decimal when val less than 0.001, see #125
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Feb 8, 2018
1 parent b5fda8f commit 3ea607d
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 < 0.001 ? 4 : // when less than 0.001, show 4 decimals, see #125
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

Expand Down

0 comments on commit 3ea607d

Please sign in to comment.