39 #ifndef CRL_MULTISENSE_FUNCTIONAL_HH 40 #define CRL_MULTISENSE_FUNCTIONAL_HH 43 namespace multisense {
50 return (((xx)-(yy) < (epsilon)) && ((xx)-(yy) > -(epsilon)));
55 approxEqual(Type
const& xx, Type
const& yy, Type
const& epsilon) {
61 boundValue(Type
const& value, Type
const& minimum, Type
const& maximum) {
62 return ((value > maximum) ? maximum : (value < minimum) ? minimum : value);
67 decayedAverage(Type
const& previous, Type
const& samples, Type
const& newest) {
68 return (((samples - 1) * previous) + newest) / samples;
bool approximatelyEqual(Type const &xx, Type const &yy, Type const &epsilon)
Type boundValue(Type const &value, Type const &minimum, Type const &maximum)
Type decayedAverage(Type const &previous, Type const &samples, Type const &newest)
bool approxEqual(Type const &xx, Type const &yy, Type const &epsilon)