:game_die: @aureooms/js-pseudo-random
Pseudorandom number generators for JavaScript. See docs.
:warning: The code requires
regeneratorRuntime
to be defined, for instance by importing regenerator-runtime/runtime. ```js import { splitmix64, nextFloat64, nextUint64, } from '@aureooms/js-pseudo-random';
const seed = [0, 0]; // Two 32-bit signed integers. const prng = splitmix64(seed); nextUint64(prng); // 64 random bits as two 32-bit signed integers (compatible with @aureooms/js-uint64). nextFloat64(prng); // A random double in the range [0, 1[. ```