Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/2a5f/randge
Generate unique random numbers
https://github.com/2a5f/randge
no-repetition random range unique
Last synced: 9 days 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 (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T08:36:06.000Z (11 months ago)
- Last Synced: 2024-03-15T10:49:21.025Z (8 months ago)
- Topics: no-repetition, random, range, unique
- Language: Rust
- Homepage: https://crates.io/crates/randge
- Size: 27.3 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# randge
![Rust](https://github.com/2A5F/randge/workflows/Rust/badge.svg)
[![version](https://img.shields.io/crates/v/randge)](https://crates.io/crates/randge)
[![documentation](https://docs.rs/randge/badge.svg)](https://docs.rs/randge)
![LICENSE](https://img.shields.io/crates/l/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]
```