coord/ops: add isfinite
call for vectors
This commit is contained in:
parent
4bea2668c3
commit
49c0b35fe7
@ -1491,7 +1491,23 @@ namespace cruft {
|
||||
val
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
template <
|
||||
std::size_t S,
|
||||
typename T,
|
||||
typename = std::enable_if_t<std::is_floating_point_v<T>>
|
||||
>
|
||||
vector<S,bool>
|
||||
isfinite (vector<S,T> const &val)
|
||||
{
|
||||
vector<S,bool> res;
|
||||
for (std::size_t i = 0; i < S; ++i)
|
||||
res[i] = std::isfinite (val[i]);
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user