nnanto / frand

Fast non-cryptographic random number generator based on XOR Shift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FRAND

frand generates fast random unsigned integers (non-cryptographic).

Uses Marsaglia's XOR shift similar to the frand function in go runtime

Usage

import (
	"fmt"
    "github.com/nnanto/frand"
)

func main() {
    x := frand.GetN(100)
    fmt.Printf("Random Number [0,100) :%v")
}

About

Fast non-cryptographic random number generator based on XOR Shift


Languages

Language:Go 100.0%