1.0.0 • Published 4 years ago
@jacobbubu/rngmt v1.0.0
@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
1.0.0
4 years ago