Skip to content

Commit

Permalink
Merge branch 'daverayment-FixSmallNegativeNumbers'
Browse files Browse the repository at this point in the history
  • Loading branch information
leongersen committed Dec 27, 2014
2 parents cda6930 + e7cdeee commit 617d608
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions test.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
});

equal ( Tester.to ( -50.999845 ), '-51' );
equal ( Tester.to ( -0.0000001 ), '0' );
});

test( "Testing mark and thousand with longer strings", function(){
Expand Down
2 changes: 1 addition & 1 deletion wNumb.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ var

// Rounding away decimals might cause a value of -0
// when using very small ranges. Remove those cases.
if ( decimals && parseFloat(input.toFixed(decimals)) === 0 ) {
if ( decimals !== false && parseFloat(input.toFixed(decimals)) === 0 ) {
input = 0;
}

Expand Down

0 comments on commit 617d608

Please sign in to comment.