Initial value:{
if (location >= 0) {
if (distance > std::numeric_limits<SI>::max() - location) {
return std::numeric_limits<SI>::max();
}
} else if (distance < std::numeric_limits<SI>::min() - location) {
return std::numeric_limits<SI>::min();
}
return location + distance
Definition at line 57 of file saturated_math.h.
57 {
58 if (location >= 0) {
59 if (distance > std::numeric_limits<SI>::max() - location) {
60 return std::numeric_limits<SI>::max();
61 }
62 } else if (distance < std::numeric_limits<SI>::min() - location) {
63 return std::numeric_limits<SI>::min();
64 }
Referenced by ONLY_ON_FLOAT().