Skip to content

Commit 1a880aa

Browse files
authored
Merge pull request #1204 from xu-cheng/uniform-example
rand: fix incorrect example in Uniform
2 parents f8106ef + 743661e commit 1a880aa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/distributions/uniform.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,10 @@
8080
//! where B1: SampleBorrow<Self::X> + Sized,
8181
//! B2: SampleBorrow<Self::X> + Sized
8282
//! {
83-
//! UniformSampler::new(low, high)
83+
//! UniformMyF32(UniformFloat::<f32>::new_inclusive(
84+
//! low.borrow().0,
85+
//! high.borrow().0,
86+
//! ))
8487
//! }
8588
//! fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> Self::X {
8689
//! MyF32(self.0.sample(rng))

0 commit comments

Comments
 (0)