@antix_development/sfc32

1.0.1 • Public • Published

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

Package Sidebar

Install

npm i @antix_development/sfc32

Weekly Downloads

5

Version

1.0.1

License

MIT

Unpacked Size

5.02 kB

Total Files

4

Last publish

Collaborators

  • antix_development