diff options
Diffstat (limited to 'vendor/github.com/vbauerster/mpb/internal/percentage.go')
-rw-r--r-- | vendor/github.com/vbauerster/mpb/internal/percentage.go | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/vendor/github.com/vbauerster/mpb/internal/percentage.go b/vendor/github.com/vbauerster/mpb/internal/percentage.go deleted file mode 100644 index 0483d2598..000000000 --- a/vendor/github.com/vbauerster/mpb/internal/percentage.go +++ /dev/null @@ -1,12 +0,0 @@ -package internal - -import "math" - -// Percentage is a helper function, to calculate percentage. -func Percentage(total, current, width int64) int64 { - if total <= 0 { - return 0 - } - p := float64(width*current) / float64(total) - return int64(math.Round(p)) -} |