Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUST

rust random float between 0 and 1

use rand::Rng; // 0.8.0

fn main() {
    // Generate random number in the range [0, 99]
    let num = rand::thread_rng().gen_range(0..100);
    println!("{}", num);
}
 
PREVIOUS NEXT
Tagged: #rust #random #float
ADD COMMENT
Topic
Name
3+6 =