Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 434 Bytes

README.md

File metadata and controls

25 lines (16 loc) · 434 Bytes

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);
}