This is the latest (main) BeagleBoard documentation. If you are looking for stable releases, use the drop-down menu on the bottom-left and select the desired version.

Function rc_saturate_double

Function Documentation

int rc_saturate_double(double *val, double min, double 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.