quintodrome/utils/random/number.go

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
157 B
Go
Raw Normal View History

2024-05-11 16:04:21 -08:00
package random
import (
"crypto/rand"
"math/big"
)
func Int64(max int64) int64 {
rnd, _ := rand.Int(rand.Reader, big.NewInt(max))
return rnd.Int64()
}