Deterministically hashes an index/salt pair to a non-negative integer.
Pure integer arithmetic (multiply, add, modulo) — no PRNG state and no
bitwise operators. The salt decorrelates different fields derived from the
same index, so e.g. an entity's persons and time do not move together.
Parameters
index: number
Entity index within its pool.
salt: number
Field-specific offset that varies output per field.
Deterministically hashes an index/salt pair to a non-negative integer.
Pure integer arithmetic (multiply, add, modulo) — no PRNG state and no bitwise operators. The
saltdecorrelates different fields derived from the same index, so e.g. an entity'spersonsandtimedo not move together.