Update CHANGELOG.md (#2124)
This commit is contained in:
1 parent
7297e4f522
commit
ad5af1b2c7
2 files changed
+22
-1
No files matched your search
@@ -279,7 +279,7 @@ func humanize(size uint64) string {
|
||||
return fmt.Sprintf("%s%s", curr.FloatString(1), prefix)
|
||||
}
|
||||
|
||||
// if curr < base-0.5 round to the nearest integer
|
||||
// if curr < base-0.5 then round to the nearest integer
|
||||
if curr.Cmp(new(big.Rat).Sub(big.NewRat(int64(base), 1), big.NewRat(1, 2))) < 0 {
|
||||
return fmt.Sprintf("%s%s", curr.FloatString(0), prefix)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user