Skip to content

Instantly share code, notes, and snippets.

View andresroberto's full-sized avatar

Andrés Rojas andresroberto

View GitHub Profile
@andresroberto
andresroberto / ecmascript-language-types.md
Last active July 22, 2022 14:48
Notes I've taken while reading the ECMAScript Language Types section of the ECMAScript specification.
const RAND_MAX = 0xffff; // 65535
const next = new Uint32Array([0]);
export function srand(seed) {
next[0] = seed;
}
export function rand() {
next[0] = next[0] * 1103515245 + 12345;