Struct dashu_float::rand::Uniform01

source ·
pub struct Uniform01<const BASE: Word> { /* private fields */ }
Expand description

A uniform distribution between 0 and 1. It can be used to replace the Standard, Open01, OpenClosed01 distributions from the rand crate when you want to customize the precision of the generated float number.

Implementations§

Create a uniform distribution in [0, 1) with a given precision.

Create a uniform distribution in [0, 1] with a given precision.

Create a uniform distribution in (0, 1) with a given precision.

Create a uniform distribution in (0, 1] with a given precision.

Trait Implementations§

Generate a random value of T, using rng as the source of randomness.
Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Create a distribution of values of ‘S’ by mapping the output of Self through the closure F Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Convert self to an expression for Diesel’s query builder. Read more
Convert &self to an expression for Diesel’s query builder. Read more
Convert self to an expression for Diesel’s query builder. Read more
Convert &self to an expression for Diesel’s query builder. Read more
Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.