Skip to content

Commit

Permalink
Merge pull request #141 from trenskow/master
Browse files Browse the repository at this point in the history
Math.floor percent
  • Loading branch information
thebigredgeek authored May 13, 2017
2 parents 52173f0 + 8f110fe commit 30d70d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/node-progress.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ ProgressBar.prototype.render = function (tokens) {
var ratio = this.curr / this.total;
ratio = Math.min(Math.max(ratio, 0), 1);

var percent = ratio * 100;
var percent = Math.floor(ratio * 100);
var incomplete, complete, completeLength;
var elapsed = new Date - this.start;
var eta = (percent == 100) ? 0 : elapsed * (this.total / this.curr - 1);
Expand Down

0 comments on commit 30d70d9

Please sign in to comment.