@overbounce/rng
v1.0.1
Published
Zero dependency random number generator based on sfc32 and MurmurHash3 algo.
Downloads
4
Readme
RNG
Zero dependency random number generator based on sfc32 and MurmurHash3 algo.
Usage
import {RandomNumberGenerator, DefaultRNG} from '@overbounce/rng';
DefaultRNG.next(); // [0, 1[
DefaultRNG.inclusiveInt(20, 120); // [20, 120]
// You can create a custom instance with a seed
const rng: RandomNumberGenerator = new RandomNumberGenerator('myseed');
rng.next();