Crate random [] [src]

Sources of randomness.

Example

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>>());

Structs

Default

An instance of the default source.

Sequence

A random sequence.

Xorshift128Plus

An instance of the Xorshift128+ algorithm.

Traits

Source

A source of randomness.

Value

A random value.

Functions

default

Create an instance of the default source.