MBot Software Library  v1.0
An API documentation to mbot_firmware repository
other.h
1 
15 #ifndef RC_MATH_OTHER_H
16 #define RC_MATH_OTHER_H
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
30 float rc_get_random_float(void);
31 
41 double rc_get_random_double(void);
42 
53 int rc_saturate_float(float* val, float min, float max);
54 
65 int rc_saturate_double(double* val, double min, double max);
66 
67 
68 #ifdef __cplusplus
69 }
70 #endif
71 
72 #endif // RC_MATH_OTHER_H
73 
int rc_saturate_double(double *val, double min, double max)
Modifies val to be bounded between between min and max.
Definition: other.c:67
int rc_saturate_float(float *val, float min, float max)
Modifies val to be bounded between between min and max.
Definition: other.c:49
float rc_get_random_float(void)
Returns a random floating point number between -1 and 1.
Definition: other.c:25
double rc_get_random_double(void)
Returns a random double-precision floating point number between -1 and 1.
Definition: other.c:40