--- id: hash-mix name: Hash.mix category: hash kind: namespace-method tokens: Hash.mix sig: Hash.mix(x) -> int tip: Avalanche one integer into a well-scrambled value. order: 4 ns: Hash member: mix --- Scrambles a single integer so its bits are thoroughly mixed — the MurmurHash3 fmix32 finalizer (shift/multiply/shift). Nearby inputs like 0, 1, 2 map to values that look unrelated, which is exactly what you want when turning a counter, entity id, or frame number into a random-looking seed. It is deterministic and self-inverse-free: the same input always gives the same output. Hash.mix(0) is 0. For folding several numbers together use Hash.combine. Parameters: - `x` — the integer to avalanche ```ludic program Seeds { entry { var i = 0 while i < 4 { print(Hash.mix(i)) # consecutive counters -> unrelated-looking seeds i = i + 1 } } } ```