Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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]
```