0.1.3 • Published 8 years ago

tinymtjs v0.1.3

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
8 years ago

TinyMTjs

Pure JavaScript implementation of the TinyMT pseudo random number generator.

Installing

npm install --save tinymtjs

Usage

Please note, this library is not cryptographically secure:

import TinyMT from 'tinymtjs'; // Import TinyMT

let tiny = new TinyMT([0xA, 0xB, 0xC, 0xD]); // Seed with an array (length of four)
let tiny2 = new TinyMT(0xAABBCCDD); // Seed with a number

tiny.Nextuint(); // Get the next unsigned 32 bit integer
console.log(tiny.status); // Check the status
tiny.Reseed(0xAABBCCDD); // Reseed
0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago