mirror of
https://github.com/owncast/owncast.git
synced 2025-11-02 20:23:29 +08:00
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