Expand description
A tiny deterministic random generator for scripts (xorshift64*), so gameplay does not need
an external crate. Keep one Rng in your script struct for a repeatable stream.
use kvas_engine::random::Rng;
let mut rng = Rng::new(42);
let a = rng.f32();
assert!((0.0..1.0).contains(&a));
assert_eq!(Rng::new(42).f32(), a, "same seed, same stream");
assert!((5..10).contains(&rng.range_i32(5, 10)));Structsยง
- Rng
- Deterministic pseudo-random numbers. Not suitable for cryptography.