# Struct rand::distributions::StandardNormal[−][src]

`pub struct StandardNormal;`

Samples floating-point numbers according to the normal distribution `N(0, 1)` (a.k.a. a standard normal, or Gaussian). This is equivalent to `Normal::new(0.0, 1.0)` but faster.

See `Normal` for the general normal distribution.

Implemented via the ZIGNOR variant1 of the Ziggurat method.

# Example

```use rand::prelude::*;
use rand::distributions::StandardNormal;

let val: f64 = SmallRng::from_entropy().sample(StandardNormal);
println!("{}", val);```

1. Jurgen A. Doornik (2005). An Improved Ziggurat Method to Generate Normal Random Samples. Nuffield College, Oxford

## Trait Implementations

### `impl Clone for StandardNormal`[src]

#### `fn clone(&self) -> StandardNormal`[src]

Returns a copy of the value. Read more

#### `fn clone_from(&mut self, source: &Self)`1.0.0[src]

Performs copy-assignment from `source`. Read more

### `impl Debug for StandardNormal`[src]

#### `fn fmt(&self, f: &mut Formatter) -> Result`[src]

Formats the value using the given formatter. Read more

### `impl Distribution<f64> for StandardNormal`[src]

#### `fn sample<R: Rng + ?Sized>(&self, rng: &mut R) -> f64`[src]

Generate a random value of `T`, using `rng` as the source of randomness.

#### ⓘImportant traits for DistIter<'a, D, R, T>### Important traits for DistIter<'a, D, R, T> `impl<'a, D, R, T> Iterator for DistIter<'a, D, R, T> where    D: Distribution<T>,    R: Rng + 'a,  type Item = T;``fn sample_iter<'a, R>(&'a self, rng: &'a mut R) -> DistIter<'a, Self, R, T> where    Self: Sized,    R: Rng, `[src]

Create an iterator that generates random values of `T`, using `rng` as the source of randomness. Read more