Surface the % of players represented in metrics
This commit is contained in:
@@ -387,3 +387,8 @@ func ShuffleStringSlice(s []string) []string {
|
||||
})
|
||||
return s
|
||||
}
|
||||
|
||||
// IntPercentage returns an int percentage of a number.
|
||||
func IntPercentage(x, total int) int {
|
||||
return int(float64(x) / float64(total) * 100)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user