diff --git a/README.md b/README.md index f1a17859e0d..75950ed4838 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ fn main() { // type, range, distribution, etc. let mut rng = thread_rng(); if rng.gen() { // random bool - let x: f64 = rng.gen(); // random number in range (0, 1) + let x: f64 = rng.gen(); // random number in range [0, 1) println!("x is: {}", x); let ch = rng.gen::(); // Sometimes you need type annotation println!("char is: {}", ch); diff --git a/src/lib.rs b/src/lib.rs index 3723754cf7b..eb23f86b87f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -111,7 +111,7 @@ //! let mut rng = thread_rng(); //! //! if rng.gen() { // random bool -//! let x: f64 = rng.gen(); // random number in range (0, 1) +//! let x: f64 = rng.gen(); // random number in range [0, 1) //! println!("x is: {}", x); //! let ch = rng.gen::(); // using type annotation //! println!("char is: {}", ch);