UNPKG

js_mt_rand

Version:

A pseudo-random generator that can produce the same numbers as the php's mt_rand do with given seed.

9 lines (6 loc) 189 B
/* Length of state vector */ export const N = 624; /* A period parameter */ export const M = 397; /* 2 ^ 31 - 1, compatibility with the php_rand */ export const MT_RAND_MAX = 0x7FFFFFFF;