def hash_of

mlbend-generative@0.1.1.0 · main.bend:58

import mlbend-generative@0.1.1.0/main.bend as MlbendGenerative
import Base

58# the hash of one counter: the step salt times the golden ratio, the
59# index added beside it
60def hash_of(+s: Nat, +i: Nat) -> U32:
61  +k = (U32.from_nat(s) * 2654435769 : U32)
62  (k + (U32.from_nat(i) + 305419898 : U32) : U32)

Uses (5)

Used by (1)