Skip to content

micro-js/srand

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

srand

Build status Git tag NPM version Code style

Seeded random number generator using a linear congruential generator. This is NOT cryptographically secure.

Installation

$ npm install @f/srand

Usage

var srand = require('@f/srand')

var rand = srand(4)

rand()
rand()
rand()

API

srand(seed)

  • seed - RNG seed. May be integer or string.

Returns: A function that, when called, generates the next random number in the sequence.

License

MIT

About

Seeded random number generator

Resources

Stars

Watchers

Forks

Packages

No packages published