#include <limits>
#include <type_traits>
#include <numeric>
Go to the source code of this file.
|  | 
| template<class T > | 
| constexpr T | microstrain::add_sat (T x, T y) noexcept | 
|  | 
| template<class T > | 
| constexpr T | microstrain::sub_sat (T x, T y) noexcept | 
|  | 
| template<class T , class U > | 
| constexpr T | microstrain::saturate_cast (U x) noexcept | 
|  | Convert an integral value to a different integral type while preventing overflow.  More... 
 | 
|  | 
| template<class T , class U > | 
| constexpr void | microstrain::assign_sat (T &destination, U value) | 
|  | Assign an integral value to a destination variable, clamping its value to the range of the destination type.  More... 
 | 
|  | 
| template<class T , class U > | 
| constexpr T & | microstrain::accum_sat (T &counter, U amount) | 
|  | Add a value to an accumulator and prevent it from overflowing.  More... 
 | 
|  | 
| template<class T , class U > | 
| constexpr T & | microstrain::reduce_sat (T &counter, U amount) | 
|  | Subtract a value from an accumulator and prevent it from overflowing.  More... 
 | 
|  |