![]()  | 
  
    MBot Software Library
    v1.0
    
   An API documentation to mbot_firmware repository 
   | 
 
Math functions that don't fit elsewhere. More...

Functions | |
| float | rc_get_random_float (void) | 
| Returns a random floating point number between -1 and 1.  More... | |
| double | rc_get_random_double (void) | 
| Returns a random double-precision floating point number between -1 and 1.  More... | |
| int | rc_saturate_float (float *val, float min, float max) | 
| Modifies val to be bounded between between min and max.  More... | |
| int | rc_saturate_double (double *val, double min, double max) | 
| Modifies val to be bounded between between min and max.  More... | |
Math functions that don't fit elsewhere.
| double rc_get_random_double | ( | void | ) | 
Returns a random double-precision floating point number between -1 and 1.
Uses standard C rand function and bitwise operations which is much faster than doing floating point arithmetic.
| float rc_get_random_float | ( | void | ) | 
Returns a random floating point number between -1 and 1.
Uses standard C rand function and bitwise operations which is much faster than doing floating point arithmetic.
| int rc_saturate_double | ( | double * | val, | 
| double | min, | ||
| double | max | ||
| ) | 
Modifies val to be bounded between between min and max.
| val | The value to be checked and possibly modified | |
| [in] | min | The lower bound | 
| [in] | max | The upper bound | 
| int rc_saturate_float | ( | float * | val, | 
| float | min, | ||
| float | max | ||
| ) | 
Modifies val to be bounded between between min and max.
| val | The value to be checked and possibly modified | |
| [in] | min | The lower bound | 
| [in] | max | The upper bound |