Skip to content

pseudo-random number generator park-miller-carta / lehmer version

License

Notifications You must be signed in to change notification settings

tvalentius/pseudo-random

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pseudo-Random Number Generator

Park-Miller-Carta pseudo-random number generator implementation.

Installation

npm install --save pseudo-random

Examples

Simple usage

const pseudoRandom = require('pseudo-random');
const prng = pseudoRandom(12021990); // set seed

// generate random number between 1 to 2000 
for (var i = 0; i < 12; i++) {
  console.log(Math.floor(prng.random()*1999)+1);
}

About

pseudo-random number generator park-miller-carta / lehmer version

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published