Merge pull request #367 from lioncash/clamp

math_util: Remove the Clamp() function
This commit is contained in:
bunnei 2018-04-20 14:18:03 -04:00 committed by GitHub
commit 326b044c19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 24 deletions

View file

@ -17,11 +17,6 @@ inline bool IntervalsIntersect(unsigned start0, unsigned length0, unsigned start
return (std::max(start0, start1) < std::min(start0 + length0, start1 + length1));
}
template <typename T>
inline T Clamp(const T val, const T& min, const T& max) {
return std::max(min, std::min(max, val));
}
template <class T>
struct Rectangle {
T left;