Function sample::signal::noise [] [src]

pub fn noise(seed: u64) -> Noise

Produces a Signal that yields random values between -1.0..1.0.

Example

extern crate sample;

fn main() {
    let mut noise = sample::signal::noise(0);
    for n in noise.take(1_000_000) {
        assert!(-1.0 <= n[0] && n[0] < 1.0);
    }
}