Function rc_saturate_float¶
Defined in File other.h
Function Documentation¶
-
int rc_saturate_float(float *val, float min, float max)¶
Modifies val to be bounded between between min and max.
- Parameters
val – The value to be checked and possibly modified
min – [in] The lower bound
max – [in] The upper bound
- Returns
Returns 1 if saturation occurred, 0 if val was already in bound, and -1 if min was falsely larger than max.