coord/ops: add scalar mod
This commit is contained in:
parent
9f3624ba3e
commit
ab89286d5c
@ -548,6 +548,24 @@ namespace util {
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
template <
|
||||
size_t S,
|
||||
typename T,
|
||||
template <size_t,typename> class K,
|
||||
typename = std::enable_if_t<
|
||||
is_coord_v<K>, void
|
||||
>
|
||||
>
|
||||
constexpr
|
||||
K<S,T>
|
||||
mod (K<S,T> k, T t)
|
||||
{
|
||||
std::transform (std::cbegin (k), std::cend (k), std::begin (k), [t] (auto v) { return mod (v, t); });
|
||||
return k;
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
// logical element operators
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user