/// @ref core /// @file glm/detail/func_vector_relational.inl #include "compute_vector_relational.hpp" namespace glm { template GLM_FUNC_QUALIFIER vec lessThan(vec const& x, vec const& y) { assert(x.length() == y.length()); vec Result; for(length_t i = 0; i < x.length(); ++i) Result[i] = x[i] < y[i]; return Result; } template GLM_FUNC_QUALIFIER vec lessThanEqual(vec const& x, vec const& y) { assert(x.length() == y.length()); vec Result; for(length_t i = 0; i < x.length(); ++i) Result[i] = x[i] <= y[i]; return Result; } template GLM_FUNC_QUALIFIER vec greaterThan(vec const& x, vec const& y) { assert(x.length() == y.length()); vec Result; for(length_t i = 0; i < x.length(); ++i) Result[i] = x[i] > y[i]; return Result; } template GLM_FUNC_QUALIFIER vec greaterThanEqual(vec const& x, vec const& y) { assert(x.length() == y.length()); vec Result; for(length_t i = 0; i < x.length(); ++i) Result[i] = x[i] >= y[i]; return Result; } template GLM_FUNC_QUALIFIER vec equal(vec const& x, vec const& y) { assert(x.length() == y.length()); vec Result; for(length_t i = 0; i < x.length(); ++i) Result[i] = detail::compute_equal::call(x[i], y[i]); return Result; } template GLM_FUNC_QUALIFIER vec notEqual(vec const& x, vec const& y) { assert(x.length() == y.length()); vec Result; for(length_t i = 0; i < x.length(); ++i) Result[i] = !detail::compute_equal::call(x[i], y[i]); return Result; } template GLM_FUNC_QUALIFIER bool any(vec const& v) { bool Result = false; for(length_t i = 0; i < v.length(); ++i) Result = Result || v[i]; return Result; } template GLM_FUNC_QUALIFIER bool all(vec const& v) { bool Result = true; for(length_t i = 0; i < v.length(); ++i) Result = Result && v[i]; return Result; } template GLM_FUNC_QUALIFIER vec not_(vec const& v) { vec Result; for(length_t i = 0; i < v.length(); ++i) Result[i] = !v[i]; return Result; } }//namespace glm #if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_UNRESTRICTED_UNIONS # include "func_vector_relational_simd.inl" #endif