Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nasa9084/go-mersenne-twister

An implementation of Mersenne Twister in Go
https://github.com/nasa9084/go-mersenne-twister

Last synced: 11 days ago
JSON representation

An implementation of Mersenne Twister in Go

Awesome Lists containing this project

README

        

# go-mersenne-twister
[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)
[![Build Status](https://travis-ci.org/nasa9084/go-mersenne-twister.svg?branch=master)](https://travis-ci.org/nasa9084/go-mersenne-twister)
[![GoDoc](https://godoc.org/github.com/nasa9084/go-mersenne-twister?status.svg)](https://godoc.org/github.com/nasa9084/go-mersenne-twister)

Implementation of Mersenne Twister in Go

## Usage

``` go
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)
}
```