File tree 2 files changed +2
-2
lines changed 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ fn main() {
51
51
// type, range, distribution, etc.
52
52
let mut rng = thread_rng ();
53
53
if rng . gen () { // random bool
54
- let x : f64 = rng . gen (); // random number in range ( 0, 1)
54
+ let x : f64 = rng . gen (); // random number in range [ 0, 1)
55
55
println! (" x is: {}" , x );
56
56
let ch = rng . gen :: <char >(); // Sometimes you need type annotation
57
57
println! (" char is: {}" , ch );
Original file line number Diff line number Diff line change 111
111
//! let mut rng = thread_rng();
112
112
//!
113
113
//! if rng.gen() { // random bool
114
- //! let x: f64 = rng.gen(); // random number in range ( 0, 1)
114
+ //! let x: f64 = rng.gen(); // random number in range [ 0, 1)
115
115
//! println!("x is: {}", x);
116
116
//! let ch = rng.gen::<char>(); // using type annotation
117
117
//! println!("char is: {}", ch);
You can’t perform that action at this time.
0 commit comments