add math/rand (#403)

c/math/rand
This commit is contained in:
tsingbx
2024-06-24 15:53:26 +08:00
committed by GitHub
parent 32a66be555
commit ec1b1ffe16
3 changed files with 39 additions and 0 deletions

15
_demo/rand/rand.go Normal file
View File

@@ -0,0 +1,15 @@
package main
import (
"github.com/goplus/llgo/c"
"github.com/goplus/llgo/c/math/rand"
)
func main() {
var s c.Uint = 6
rand.Srand(s)
rr := rand.RandR(&s)
r := rand.Rand()
println("r:", r)
println("rr:", rr)
}