Skip to main content

Crate use_seed

Crate use_seed 

Source
Expand description

Repeatable seed helpers for primitive simulations.

The crate provides a tiny deterministic mixing function so sibling crates can derive stable pseudo-random samples without pulling in a full RNG dependency.

§Examples

use use_seed::SimulationSeed;

let seed = SimulationSeed::new(7);
let branches = seed.split(3).unwrap();

assert_eq!(branches.len(), 3);
assert!(seed.to_unit_f64() >= 0.0);
assert!(seed.to_unit_f64() <= 1.0);

Structs§

SimulationSeed

Enums§

SeedError

Functions§

mix_value
unit_f64_from_seed