pub struct SimpleRng { /* private fields */ }Expand description
Self-contained, seed-based 64-bit pseudo-random number generator (SplitMix64).
Designed to provide deterministic, platform-independent random number generation without
pulling in external dependencies like rand.
Implementations§
Source§impl SimpleRng
impl SimpleRng
Sourcepub fn next_f64(&mut self) -> f64
pub fn next_f64(&mut self) -> f64
Generates a pseudo-random f64 in the half-open interval [0.0, 1.0).
Sourcepub fn next_range(&mut self, min: f64, max: f64) -> f64
pub fn next_range(&mut self, min: f64, max: f64) -> f64
Generates a pseudo-random f64 uniformly distributed in [min, max).
Sourcepub fn next_gaussian(&mut self) -> f64
pub fn next_gaussian(&mut self) -> f64
Generates a standard normally distributed variable (mean 0.0, std dev 1.0) using the Box-Muller transform.
Trait Implementations§
impl Eq for SimpleRng
impl StructuralPartialEq for SimpleRng
Auto Trait Implementations§
impl Freeze for SimpleRng
impl RefUnwindSafe for SimpleRng
impl Send for SimpleRng
impl Sync for SimpleRng
impl Unpin for SimpleRng
impl UnsafeUnpin for SimpleRng
impl UnwindSafe for SimpleRng
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