[][src]Struct smth::Random

pub struct Random {
    pub state: u32,
}

Fields

state: u32

Implementations

impl Random[src]

pub fn new(seed: u32) -> Self[src]

pub fn next(&mut self)[src]

pub fn in_01<T: Float>(&mut self) -> T[src]

pub fn in_range<T: Float>(&mut self, min: T, max: T) -> T[src]

pub fn probability<T: Float>(&mut self, probability: T) -> bool[src]

pub fn in_sphere<T: Float>(&mut self) -> Vec3<T>[src]

pub fn in_hemisphere<T: Float>(&mut self, normal: Vec3<T>) -> Vec3<T>[src]

pub fn in_disk<T: Float>(&mut self) -> Vec2<T>[src]

Trait Implementations

impl<'de> Deserialize<'de> for Random[src]

impl Serialize for Random[src]

Auto Trait Implementations

impl RefUnwindSafe for Random

impl Send for Random

impl Sync for Random

impl Unpin for Random

impl UnwindSafe for Random

Blanket Implementations

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

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

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

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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.