coord: add scalar gte, lte
This commit is contained in:
parent
3ff420978e
commit
b67bb283d1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user