mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-11 15:30:07 +00:00
16 lines
252 B
Go
16 lines
252 B
Go
package util
|
|
|
|
import (
|
|
"math/rand"
|
|
"time"
|
|
)
|
|
|
|
// RandUint32 return a random number between min and max.
|
|
func RandUint32(min, max int) uint32 {
|
|
n := min + rand.Intn(max-min)
|
|
return uint32(n)
|
|
}
|
|
|
|
func init() {
|
|
rand.Seed(time.Now().UTC().UnixNano())
|
|
}
|