pub struct UniformRandomStream {
pub m_idum: i32,
pub m_iy: i32,
pub m_iv: Vec<i32>,
}
Expand description
The Uniform Random Number Generator
Should be instantiated with the with_seed
method.
§Usage
use valve_sdk13_rng::UniformRandomStream;
let mut gen = UniformRandomStream::with_seed(72);
let res = gen.random_f64(0_f64, 1_f64);
assert_eq!(0.543_099_8, res);
Fields§
§m_idum: i32
§m_iy: i32
§m_iv: Vec<i32>
Implementations§
Trait Implementations§
Source§impl Clone for UniformRandomStream
impl Clone for UniformRandomStream
Source§fn clone(&self) -> UniformRandomStream
fn clone(&self) -> UniformRandomStream
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for UniformRandomStream
impl RefUnwindSafe for UniformRandomStream
impl Send for UniformRandomStream
impl Sync for UniformRandomStream
impl Unpin for UniformRandomStream
impl UnwindSafe for UniformRandomStream
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more