MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / gen_f64_in_range

Function gen_f64_in_range

nodedb/src/engine/random/csprng.rs:92–98  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

90
91 #[test]
92 fn gen_f64_in_range() {
93 let mut rng = SeedableRng::from_seed_str("test");
94 for _ in 0..100 {
95 let v = rng.gen_f64();
96 assert!((0.0..1.0).contains(&v));
97 }
98 }
99}

Callers

nothing calls this directly

Calls 1

gen_f64Method · 0.80

Tested by

no test coverage detected