Skip to content

Commit 0ff7ed2

Browse files
committed
#515 Solved
1 parent 7de892f commit 0ff7ed2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

numeral.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@
395395
power = Math.pow(10, boundedPrecision);
396396

397397
// Multiply up by precision, round accurately, then divide and use native toFixed():
398-
output = (roundingFunction(value + 'e+' + boundedPrecision) / power).toFixed(boundedPrecision);
398+
output = (roundingFunction((value + 'e+' + boundedPrecision) -0.5)/ power).toFixed(boundedPrecision);
399399

400400
if (optionals > maxDecimals - boundedPrecision) {
401401
optionalsRegExp = new RegExp('\\.?0{1,' + (optionals - (maxDecimals - boundedPrecision)) + '}$');

0 commit comments

Comments
 (0)