mt19937
mt19937(
seed?):Mt19937
Defined in: src/engine/mt19937.ts:114
Mersenne Twister — the engine behind Python’s random and many others.
Here for reproducing a stream produced elsewhere. It is slower and much larger than the rest, and fails some of the TestU01 battery; there is no reason to choose it for new work.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Example
Section titled “Example”const source = mt19937(12345);source.nextUint32(); // 376690009
// Seeding by array, as init_by_array does.mt19937([0x123, 0x234, 0x345, 0x456]);