quintodrome/utils/number/number.go

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

12 lines
163 B
Go
Raw Normal View History

package number
2023-01-13 17:40:24 -09:00
import (
"crypto/rand"
"math/big"
)
2023-01-13 17:40:24 -09:00
func RandomInt64(max int64) int64 {
rnd, _ := rand.Int(rand.Reader, big.NewInt(max))
return rnd.Int64()
}