| 461 | // (Exceptionally using templates here but we could also redefine them for those types) |
| 462 | template<typename T> static inline T ImMin(T lhs, T rhs) { return lhs < rhs ? lhs : rhs; } |
| 463 | template<typename T> static inline T ImMax(T lhs, T rhs) { return lhs >= rhs ? lhs : rhs; } |
| 464 | template<typename T> static inline T ImClamp(T v, T mn, T mx) { return (v < mn) ? mn : (v > mx) ? mx : v; } |
| 465 | template<typename T> static inline T ImLerp(T a, T b, float t) { return (T)(a + (b - a) * t); } |
| 466 | template<typename T> static inline void ImSwap(T& a, T& b) { T tmp = a; a = b; b = tmp; } |
no test coverage detected