pub enum RandomSource {
Xoroshiro(Xoroshiro),
Legacy(LegacyRandom),
}Expand description
A source of random numbers.
Variants§
Xoroshiro(Xoroshiro)
A xoroshiro random number generator.
Legacy(LegacyRandom)
A legacy Minecraft random number generator.
Trait Implementations§
Source§impl From<LegacyRandom> for RandomSource
impl From<LegacyRandom> for RandomSource
Source§fn from(v: LegacyRandom) -> RandomSource
fn from(v: LegacyRandom) -> RandomSource
Converts to this type from the input type.
Source§impl From<Xoroshiro> for RandomSource
impl From<Xoroshiro> for RandomSource
Source§fn from(v: Xoroshiro) -> RandomSource
fn from(v: Xoroshiro) -> RandomSource
Converts to this type from the input type.
Source§impl Random for RandomSource
impl Random for RandomSource
fn fork(&mut self) -> Self
fn next_i32(&mut self) -> i32
fn next_i32_bounded(&mut self, __enum_dispatch_arg_0: i32) -> i32
fn next_i32_between( &mut self, __enum_dispatch_arg_0: i32, __enum_dispatch_arg_1: i32, ) -> i32
fn next_i32_between_exclusive( &mut self, __enum_dispatch_arg_0: i32, __enum_dispatch_arg_1: i32, ) -> i32
fn next_i64(&mut self) -> i64
fn next_f32(&mut self) -> f32
fn next_f64(&mut self) -> f64
fn next_bool(&mut self) -> bool
fn next_gaussian(&mut self) -> f64
fn triangle( &mut self, __enum_dispatch_arg_0: f64, __enum_dispatch_arg_1: f64, ) -> f64
fn triangle_f32( &mut self, __enum_dispatch_arg_0: f32, __enum_dispatch_arg_1: f32, ) -> f32
fn next_positional(&mut self) -> RandomSplitter
fn consume_count(&mut self, __enum_dispatch_arg_0: i32)
Source§impl TryInto<LegacyRandom> for RandomSource
impl TryInto<LegacyRandom> for RandomSource
Auto Trait Implementations§
impl Freeze for RandomSource
impl RefUnwindSafe for RandomSource
impl Send for RandomSource
impl Sync for RandomSource
impl Unpin for RandomSource
impl UnsafeUnpin for RandomSource
impl UnwindSafe for RandomSource
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