pub struct XorShiftRng { /* private fields */ }Expand description
Used for generating pseudo-random numbers quickly.
Implementations§
Source§impl XorShiftRng
impl XorShiftRng
Sourcepub fn new(seed: u64) -> XorShiftRng
pub fn new(seed: u64) -> XorShiftRng
Create an instance of the XorShiftRng pseudo-random
number generator with a specific seed.
Sourcepub fn next_noise_sample(&mut self) -> f64
pub fn next_noise_sample(&mut self) -> f64
Generate the next pseudo-random number.
Trait Implementations§
Source§impl Default for XorShiftRng
impl Default for XorShiftRng
Source§fn default() -> XorShiftRng
fn default() -> XorShiftRng
Create a default instance of the XorShiftRng
pseudo-random number generator.
Auto Trait Implementations§
impl Freeze for XorShiftRng
impl RefUnwindSafe for XorShiftRng
impl Send for XorShiftRng
impl Sync for XorShiftRng
impl Unpin for XorShiftRng
impl UnwindSafe for XorShiftRng
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