Struct radiant_utils::util::ARng [−][src]
pub struct ARng(_);
A very simple, seedable atomic random number generator based on sin().
Methods
impl ARng
[src]
impl ARng
pub fn new(seed: usize) -> ARng
[src]
pub fn new(seed: usize) -> ARng
Creates a new instance with given seed.
pub fn get(&self) -> f64
[src]
pub fn get(&self) -> f64
Returns a random number between 0.0 and non-inclusive 1.0
pub fn range(&self, min: f64, max: f64) -> f64
[src]
pub fn range(&self, min: f64, max: f64) -> f64
Returns a random number between min and non-inclusive max.
ⓘImportant traits for &'a mut Rpub fn chose<'a, T>(&self, source: &'a [T]) -> &'a T
[src]
ⓘImportant traits for &'a mut R
pub fn chose<'a, T>(&self, source: &'a [T]) -> &'a T
Returns a random item from given slice.