/go-mersenne-twister

An implementation of Mersenne Twister in Go

Primary LanguageGoOtherNOASSERTION

go-mersenne-twister

MIT License Build Status GoDoc

Implementation of Mersenne Twister in Go

Usage

package main

import (
    "fmt"
    "github.com/nasa9084/go-mersenne-twister"
)

func main() {
    mt.InitGenrand(0) // '0' is a seed. choose freely.
    n := mt.GenrandInt32() // generate int 32 random value.
    fmt.Printf("%d", n)
}