Struct naia_socket_shared::Random
source · [−]pub struct Random {}
Expand description
Container for cross-platform Random methods
Implementations
sourceimpl Random
impl Random
sourcepub fn gen_range_f32(lower: f32, upper: f32) -> f32
pub fn gen_range_f32(lower: f32, upper: f32) -> f32
returns a random f32 value between an upper & lower bound
sourcepub fn gen_range_u32(lower: u32, upper: u32) -> u32
pub fn gen_range_u32(lower: u32, upper: u32) -> u32
returns a random u32 value between an upper & lower bound
Auto Trait Implementations
impl RefUnwindSafe for Random
impl Send for Random
impl Sync for Random
impl Unpin for Random
impl UnwindSafe for Random
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more