internal width
Vladimir Bauer
6 years ago
| 15 | 15 |
func PercentageRound(total, current int64, width int) float64 {
|
| 16 | 16 |
return math.Round(Percentage(total, current, width))
|
| 17 | 17 |
}
|
| 18 | |
|
| 19 | |
func CalcWidthForBarFiller(reqWidth, available int) int {
|
| 20 | |
if reqWidth <= 0 || reqWidth >= available {
|
| 21 | |
return available
|
| 22 | |
}
|
| 23 | |
return reqWidth
|
| 24 | |
}
|
|
0 |
package internal
|
|
1 |
|
|
2 |
func CalcWidthForBarFiller(reqWidth, available int) int {
|
|
3 |
if reqWidth <= 0 || reqWidth >= available {
|
|
4 |
return available
|
|
5 |
}
|
|
6 |
return reqWidth
|
|
7 |
}
|