seedStatefunction
Hashes a string seed with UTF-8 FNV-1a and returns a nonzero uint32 state.
Import it
import { seedState } from "@johnmorrisdotca/houseki/falling-triplets";
Definition
function seedState(seed: string): number
Parameters
| Name | Type | Description |
|---|---|---|
seed | string | A string seed hashed into a nonzero deterministic random state. |
Returns
number
Hashes a string seed with UTF-8 FNV-1a and returns a nonzero uint32 state.
Examples
import { seedState } from "@johnmorrisdotca/houseki/falling-triplets";
console.log(seedState("docs"));686503122What it prints (run when this page was built)