Struct rustduino::math::RandomNumberGenerator [−][src]
#[repr(C, packed)]pub struct RandomNumberGenerator { /* fields omitted */ }
Expand description
Controls the implementation of Random Number Generators.
Elements
pins
- structure containing array to control all pins of micro-controller.mpu
- a static mutable reference to the pointer location to control MPU6050 gyroscope.mode
- aGenerator
object, which stores the implementation method for random number generator.
Implementations
Create a new structure object for Random Number Generation. This structure contains elements for both ways of number generation implemented.
Returns
a struct of type Random Number Generator
- to be used for the struct’s implementation.
Generation of random number through random noise in environment detected by read through analog pins input.
Returns
a u8
- a random number generated by random noise as detected by analog pins during reading.
Generation of random number through random noise in environment detected through the MPU6050 sensor in the orthonormal set of axes.
Returns
a u8
- a random number generated by multiple seeding within numbers generated by MPU6050 sensor.