mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-08-19 19:04:15 -04:00
13 lines
112 B
Go
13 lines
112 B
Go
package dice
|
|
|
|
import (
|
|
"math/rand"
|
|
)
|
|
|
|
func Roll(n int) int {
|
|
if n == 1 {
|
|
return 0
|
|
}
|
|
return rand.Intn(n)
|
|
}
|