pub struct XorShift32 { /* private fields */ }Expand description
xorshift32 state. Seed 0 is remapped because it is a fixed point.
Implementations§
Source§impl XorShift32
impl XorShift32
Sourcepub fn below(&mut self, low: i64, high: i64) -> i64
pub fn below(&mut self, low: i64, high: i64) -> i64
Deterministic draw in [low, high] (inclusive). Uses a 64-bit
draw modulo the span so large ranges stay uniform-ish; the
result is exact for spans up to u64::MAX.
§Panics
Panics when low > high (debug assertion only in release-safe
callers — generation checks ranges first).
Trait Implementations§
Source§impl Clone for XorShift32
impl Clone for XorShift32
Auto Trait Implementations§
impl Forget for XorShift32
impl Freeze for XorShift32
impl Move for XorShift32
impl RefUnwindSafe for XorShift32
impl Send for XorShift32
impl Sync for XorShift32
impl Unpin for XorShift32
impl UnsafeUnpin for XorShift32
impl UnwindSafe for XorShift32
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