Crates.io | random |
lib.rs | random |
version | 0.14.0 |
source | src |
created_at | 2015-06-23 11:38:43.032989 |
updated_at | 2023-04-23 13:35:13.423791 |
description | The package provides sources of randomness. |
homepage | https://github.com/stainless-steel/random |
repository | https://github.com/stainless-steel/random |
max_upload_size | |
id | 2455 |
size | 9,446 |
The packages provides sources of randomness.
use random::Source;
let mut source = random::default(42);
println!("Scalar: {:?}", source.read::<f64>());
println!("Vector: {:?}", source.iter().take(2).collect::<Vec<f64>>());
Your contribution is highly appreciated. Do not hesitate to open an issue or a pull request. Note that any contribution submitted for inclusion in the project will be licensed according to the terms given in LICENSE.md.