coord: add scalar gte, lte

This commit is contained in:
Danny Robson 2015-05-26 16:25:41 +10:00
parent 3ff420978e
commit b67bb283d1

View File

@ -282,6 +282,18 @@ namespace util {
T
max (K<S,T> k)
{ return *std::max_element (k.begin (), k.end ()); }
template <size_t S, typename T, template<size_t,typename> class K>
bool
operator>= (K<S,T> k, T t)
{ return min (k) >= t; }
template <size_t S, typename T, template<size_t,typename> class K>
bool
operator<= (K<S,T> k, T t)
{ return max (k) <= t; }
}
#endif