@jacobbubu/rngmt
v1.0.0
Published
[![Build Status](https://github.com/jacobbubu/rngmt/workflows/Build%20and%20Release/badge.svg)](https://github.com/jacobbubu/rngmt/actions?query=workflow%3A%22Build+and+Release%22) [![Coverage Status](https://coveralls.io/repos/github/jacobbubu/rngmt/badg
Downloads
4
Readme
@jacobbubu/rngmt
Implementation of mersenne-twister random number generation algorithm with TypeScript
Intro.
This module was modified from rng for two reasons:
- Comes with TypeScript type declaration
- Help my colleagues migrate to other programming languages with minimal effort
Usage
import { RNG } from '@jacobbubu/rngmt'
const rng = new RNG() // or send a seed number as parameter
rng.random() // returns a tempered pseudorandom number between 0 and 1
rng.range(0, 100) // returns a number between 0 and 100
License
MIT