We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
util/rng.rs
1 parent 9754acb commit 50d839dCopy full SHA for 50d839d
tower/src/util/rng.rs
@@ -25,7 +25,7 @@ pub trait Rng {
25
/// Generate a random [`f64`] between `[0, 1)`.
26
fn next_f64(&mut self) -> f64 {
27
// Borrowed from:
28
- // https://github.com/rust-random/rand/blob/master/src/distributions/float.rs#L106
+ // https://github.com/rust-random/rand/blob/master/src/distr/float.rs#L108
29
let float_size = std::mem::size_of::<f64>() as u32 * 8;
30
let precision = 52 + 1;
31
let scale = 1.0 / ((1u64 << precision) as f64);
0 commit comments