Skip to main content

hash_unit

Function hash_unit 

Source
pub fn hash_unit(a: i64, b: i64, seed: i64) -> f64
Expand description

Deterministic pseudo-random value in [0.0, 1.0) from three integer inputs.

Pure integer bit-mixing (a variant of the SplitMix64 finalizer with the three inputs folded in via distinct odd constants), then the top 53 bits are mapped to [0.0, 1.0). Using only the top 53 bits keeps every result exactly representable as an f64 and strictly below 1.0.