1.0.1 • Published 2 years ago

@antix_development/sfc32 v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

sfc32

About

Deterministic random number generator, based on the npm-deterministic-random-sequence package by Paul Browne.

Installation

npm install @antix_development/sfc32

Usage

Require the package

const sfc32 = require('@antix_development/sfc32');

Create a new random generator using the given seed string.

const rng = sfc32('random');

Get a random floating point number between 0 and 1.

let f = rng.float();

Get a random integer in the given inclusive range.

let i = rng.int(1, 10);

Get true or false.

let b = rng.bool();