Skip to content

Commit

Permalink
Merge pull request #487 from vks/patch-2
Browse files Browse the repository at this point in the history
Correct float range in README
  • Loading branch information
pitdicker authored Jun 5, 2018
2 parents b4fd320 + 4f9023c commit f8b8ffc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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::<char>(); // Sometimes you need type annotation
println!("char is: {}", ch);
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<char>(); // using type annotation
//! println!("char is: {}", ch);
Expand Down

0 comments on commit f8b8ffc

Please sign in to comment.