coord/ops: add scalar bool overload for any
This commit is contained in:
parent
2d801a1725
commit
f830b149b0
@ -1225,6 +1225,19 @@ namespace util {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
///------------------------------------------------------------------------
|
||||||
|
/// returns true if the value is true.
|
||||||
|
///
|
||||||
|
/// provided so that templates may operate with the same calls for vectors
|
||||||
|
/// and scalars. eg, any (t >= 0 && t <= 1) should work for arbitrary
|
||||||
|
/// types.
|
||||||
|
constexpr
|
||||||
|
bool any (const bool val)
|
||||||
|
{
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
namespace detail {
|
namespace detail {
|
||||||
template <
|
template <
|
||||||
@ -1272,7 +1285,7 @@ namespace util {
|
|||||||
/// returns true if the value is true.
|
/// returns true if the value is true.
|
||||||
///
|
///
|
||||||
/// provided so that templates may operate with the same calls for vectors
|
/// provided so that templates may operate with the same calls for vectors
|
||||||
/// and scalars. eg, all (t >= 0 && t <= 1) shold work for either type.
|
/// and scalars. eg, all (t >= 0 && t <= 1) should work for either type.
|
||||||
constexpr bool
|
constexpr bool
|
||||||
all (bool val)
|
all (bool val)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user