fix: update logic of Percent function

This commit is contained in:
dudaodong committed 2023-05-18 10:11:48 +08:00
1 parent cd91e16b26
commit f05477d9cf
5 files changed
+29 -19

No files matched your search

+1 -1
View File
@@ -60,7 +60,7 @@ func Percent(val, total float64, n int) float64 {
if total == 0 {
return float64(0)
}
tmp := val / total
tmp := val / total * 100
result := RoundToFloat(tmp, n)
return result