Added constexpr relational operators

This commit is contained in:
Christophe Riccio
2018-08-06 19:28:42 +02:00
parent f82d23949a
commit 389fb2457d
12 changed files with 121 additions and 64 deletions

View File

@@ -34,7 +34,7 @@ namespace glm
///
/// @see ext_vector_relational
template<length_t L, typename T, qualifier Q>
GLM_FUNC_DECL vec<L, bool, Q> equal(vec<L, T, Q> const& x, vec<L, T, Q> const& y, T epsilon);
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> equal(vec<L, T, Q> const& x, vec<L, T, Q> const& y, T epsilon);
/// Returns the component-wise comparison of |x - y| < epsilon.
/// True if this expression is satisfied.
@@ -45,7 +45,7 @@ namespace glm
///
/// @see ext_vector_relational
template<length_t L, typename T, qualifier Q>
GLM_FUNC_DECL vec<L, bool, Q> equal(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, T, Q> const& epsilon);
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> equal(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, T, Q> const& epsilon);
/// Returns the component-wise comparison of |x - y| >= epsilon.
/// True if this expression is not satisfied.
@@ -56,7 +56,7 @@ namespace glm
///
/// @see ext_vector_relational
template<length_t L, typename T, qualifier Q>
GLM_FUNC_DECL vec<L, bool, Q> notEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y, T epsilon);
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> notEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y, T epsilon);
/// Returns the component-wise comparison of |x - y| >= epsilon.
/// True if this expression is not satisfied.
@@ -67,7 +67,7 @@ namespace glm
///
/// @see ext_vector_relational
template<length_t L, typename T, qualifier Q>
GLM_FUNC_DECL vec<L, bool, Q> notEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, T, Q> const& epsilon);
GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> notEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y, vec<L, T, Q> const& epsilon);
/// @}
}//namespace glm