Class: PCG32

bit-generators.PCG32(seedopt, streamopt)

PCG32 (PCG-XSH-RR 64/32) by Melissa E. O'Neill (2014). 64-bit state, 2^63 selectable streams, period 2^64. Output is bit-identical to the reference C implementation pcg32_random_r.

Reference: https://www.pcg-random.org/

Constructor

new PCG32(seedopt, streamopt)

Parameters:
Name Type Attributes Description
seed number | bigint | string | Array.<number> <optional>

Seed. Random if omitted.

stream number | bigint <optional>

Stream selector (sequence constant). Derived from the seed if omitted.

Source: