File: README.md

package info (click to toggle)
rust-random 0.12.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 112 kB
  • sloc: makefile: 4
file content (27 lines) | stat: -rw-r--r-- 915 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Random [![Version][version-img]][version-url] [![Status][status-img]][status-url]

The packages provides sources of randomness.

## [Documentation][documentation]

## Example

```rust
use random::Source;

let mut source = random::default().seed([42, 69]);
println!("Scalar: {:?}", source.read::<f64>());
println!("Vector: {:?}", source.iter().take(2).collect::<Vec<f64>>());
```

## Contribution

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](LICENSE.md).

[documentation]: https://docs.rs/random
[status-img]: https://travis-ci.org/stainless-steel/random.svg?branch=master
[status-url]: https://travis-ci.org/stainless-steel/random
[version-img]: https://img.shields.io/crates/v/random.svg
[version-url]: https://crates.io/crates/random