2 stable releases
1.1.0 | Dec 6, 2020 |
---|---|
1.0.0 | Dec 4, 2020 |
#2268 in Algorithms
22KB
579 lines
randge
Generate unique random numbers
Example
use rand::thread_rng;
let v = randge(-15..15, 5, thread_rng());
let v: Vec<_> = v.collect();
// output: like [13, -3, -14, 5, 3]
lib.rs
:
Generate random numbers that are not repeated in the range
Example
use rand::thread_rng;
let v = randge(-15..15, 5, thread_rng());
let v: Vec<_> = v.collect();
// output: like [13, -3, -14, 5, 3]
Features
rand
Dependencies
~1.5–2.2MB
~39K SLoC