coord/ops: add scalar/vector relational operators
This commit is contained in:
parent
6e32ad84a7
commit
dba4e673ca
@ -887,6 +887,25 @@ namespace util {
|
||||
for (size_t i = 0; i < S; ++i) \
|
||||
out[i] = k[i] OP u; \
|
||||
return out; \
|
||||
} \
|
||||
\
|
||||
template < \
|
||||
size_t S, \
|
||||
typename T, \
|
||||
typename U, \
|
||||
template <size_t,typename> class K, \
|
||||
typename = std::enable_if_t< \
|
||||
is_coord_v<K<S,T>>, void \
|
||||
> \
|
||||
> \
|
||||
constexpr \
|
||||
vector<S,bool> \
|
||||
operator OP (const U u, const K<S,T> k) \
|
||||
{ \
|
||||
vector<S,bool> out {}; \
|
||||
for (size_t i = 0; i < S; ++i) \
|
||||
out[i] = u OP k[i]; \
|
||||
return out; \
|
||||
}
|
||||
|
||||
SCALAR_OP(<)
|
||||
|
Loading…
Reference in New Issue
Block a user