#include "alfe/main.h" #ifndef INCLUDED_MININUM_MAXIMUM_H #define INCLUDED_MININUM_MAXIMUM_H template T max(const T& a, const T& b) { return a > b ? a : b; } template T min(const T& a, const T& b) { return a < b ? a : b; } template T clamp(T low, T value, T high) { return min(max(low, value), high); } template Byte byteClamp(T value) { return clamp(0, static_cast(value), 0xff); } template T max(const T& a, const T& b, const T& c) { return max(a, max(b, c)); } template T min(const T& a, const T& b, const T& c) { return min(a, min(b, c)); } template T max(const T& a, const T& b, const T& c, const T& d) { return max(a, max(b, c, d)); } template T min(const T& a, const T& b, const T& c, const T& d) { return min(a, min(b, c, d)); } #endif // INCLUDED_MININUM_MAXIMUM_H