Simplify percentage calculation (#1987)
This commit is contained in:
1 parent
7158e09033
commit
4666a0b875
1 file changed
+1
-2
@@ -920,8 +920,7 @@ func (ui *ui) drawRuler(nav *nav) {
|
|||||||
progress := []string{}
|
progress := []string{}
|
||||||
|
|
||||||
if nav.copyTotal > 0 {
|
if nav.copyTotal > 0 {
|
||||||
percentage := int((100 * float64(nav.copyBytes)) / float64(nav.copyTotal))
|
progress = append(progress, fmt.Sprintf("[%d%%]", nav.copyBytes*100/nav.copyTotal))
|
||||||
progress = append(progress, fmt.Sprintf("[%d%%]", percentage))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if nav.moveTotal > 0 {
|
if nav.moveTotal > 0 {
|
||||||
|
|||||||
Reference in new issue
Block a user