https://github.com/2a5f/randge
Generate unique random numbers
https://github.com/2a5f/randge
no-repetition random range unique
Last synced: 2 months ago
JSON representation
Generate unique random numbers
- Host: GitHub
- URL: https://github.com/2a5f/randge
- Owner: 2A5F
- License: mit
- Created: 2020-12-02T12:27:26.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T08:36:06.000Z (over 1 year ago)
- Last Synced: 2025-05-02T08:55:43.317Z (2 months ago)
- Topics: no-repetition, random, range, unique
- Language: Rust
- Homepage: https://crates.io/crates/randge
- Size: 27.3 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# randge

[](https://crates.io/crates/randge)
[](https://docs.rs/randge)
Generate unique random numbers
## Example
```rust
use rand::thread_rng;let v = randge(-15..15, 5, thread_rng());
let v: Vec<_> = v.collect();
// output: like [13, -3, -14, 5, 3]
```