RandomRange

Trait RandomRange 

Source
pub trait RandomRange {
    // Required method
    fn random_range(low: Self, high: Self) -> Self;
}
Expand description

Trait for random number generation with a range

Required Methods§

Source

fn random_range(low: Self, high: Self) -> Self

Generate a random number in the range (low, high)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl RandomRange for f32

Source§

fn random_range(min: f32, max: f32) -> f32

Source§

impl RandomRange for f64

Source§

fn random_range(min: f64, max: f64) -> f64

Source§

impl RandomRange for i8

Source§

fn random_range(min: i8, max: i8) -> i8

Source§

impl RandomRange for i16

Source§

fn random_range(min: i16, max: i16) -> i16

Source§

impl RandomRange for i32

Source§

fn random_range(min: i32, max: i32) -> i32

Source§

impl RandomRange for i64

Source§

fn random_range(min: i64, max: i64) -> i64

Source§

impl RandomRange for i128

Source§

impl RandomRange for u8

Source§

fn random_range(min: u8, max: u8) -> u8

Source§

impl RandomRange for u16

Source§

fn random_range(min: u16, max: u16) -> u16

Source§

impl RandomRange for u32

Source§

fn random_range(min: u32, max: u32) -> u32

Source§

impl RandomRange for u64

Source§

fn random_range(min: u64, max: u64) -> u64

Source§

impl RandomRange for u128

Source§

impl RandomRange for usize

Source§

impl RandomRange for Vec4

Source§

impl RandomRange for Vec2

Source§

impl RandomRange for Vec3

Source§

impl RandomRange for IVec2

Source§

impl RandomRange for IVec3

Source§

impl RandomRange for IVec4

Source§

impl RandomRange for UVec2

Source§

impl RandomRange for UVec3

Source§

impl RandomRange for UVec4

Implementors§