Skip to content

Park-Miller pseudorandom number generator (PRNG)

License

Notifications You must be signed in to change notification settings

sindresorhus/park-miller

Repository files navigation

park-miller

Park-Miller pseudorandom number generator (PRNG)

Install

$ npm install park-miller

Usage

import ParkMiller from 'park-miller';

const random = new ParkMiller(10);

random.integer();
//=> 2027521326

API

const random = new ParkMiller(seed)

seed

Type: integer

Initialization seed.

random.integer()

random.integerInRange(min, max)

random.float()

random.floatInRange(min, max)

random.boolean()

Related

  • randoma - User-friendly pseudorandom number generator (PRNG)