API reference
lib/seed-hash
Import
Section titled “Import”import * as api from "@fungi.computer/caps/lib/seed-hash";Exports
Section titled “Exports”| Kind | Export | Description |
|---|---|---|
| function | seedHash() | A stable 32-bit FNV-1a hash: the same seed always lands on the same value, and short, similar seeds spread apart. Used to pick a deterministic tone, color, or pattern from an identity (a name, an Agent id) without state. |
seedHash()function
Section titled “seedHash()”function seedHash(seed): number;A stable 32-bit FNV-1a hash: the same seed always lands on the same value, and short, similar seeds spread apart. Used to pick a deterministic tone, color, or pattern from an identity (a name, an Agent id) without state.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
seed |
string |
Returns
Section titled “Returns”number