Module mini_functions::random::macros
source · Expand description
The macros
module contains functions for generating macros.
Macros for the Random (VRD)
crate.
This module contains macros that simplify working with the
Random (VRD)
crate.
The macros included in this module allow for quick and easy access to common functionality provided by the Random (VRD) crate.
These macros can greatly simplify code that uses the Random (VRD)
crate, making it easier to read and maintain.
Macros
The following macros are provided by this module:
rand_bool!()
- Generate a random boolean with the provided probabilityrand_bytes!()
- Generate a vector of random bytes with the provided lengthrand_char!()
- Generate a random char within the range ‘a’..=‘z’rand_choose!()
- Generate a random element from a slice of valuesrand_float!()
- Generate a random floatrand_int!()
- Generate a random integer within the given rangerand_uint!()
- Generate a random 32-bit unsigned integer within the given rangerand_double!()
- Generate a random doublerand_new!()
- Generate a new random numberrand_pseudo!()
- Generate a pseudo random numberrand_range!()
- Generate a random number within the given rangerand_seed!()
- Seed the providedRandom (VRD)
struct with the given valuerand_twist!()
- Twist the state of the providedRandom (VRD)
struct