[][src]Struct weyl::Rng

pub struct Rng { /* fields omitted */ }

Middle Square Weyl Sequence PRNG In other words it generates random numbers.

Methods

impl Rng[src]

pub fn new() -> Self[src]

pub fn new_seed(seed: u64) -> Self[src]

pub fn last_seed(&self) -> u64[src]

returns the last seed used to initialize the generator

pub fn seed(&mut self, seed: u64)[src]

reseed the generator

pub fn u64(&mut self) -> u64[src]

generates a random u64

pub fn f64(&mut self) -> f64[src]

generates a random f64

pub fn fill(&mut self, bytes: &mut [u8])[src]

fill bytes slice with random data

Auto Trait Implementations

impl Sync for Rng

impl Send for Rng

impl Unpin for Rng

impl RefUnwindSafe for Rng

impl UnwindSafe for Rng

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]