github.com/gotranspile/cxgo@v0.3.7/runtime/libc/rand.go (about) 1 package libc 2 3 import ( 4 "math" 5 "math/rand" 6 ) 7 8 const RandMax = math.MaxInt32 9 10 func Rand() int32 { 11 return int32(rand.Intn(RandMax)) 12 } 13 14 func SeedRand(seed uint32) { 15 rand.Seed(int64(seed)) 16 }