master
ブランチ master
ShaderPlayground / deps / glm / glm / ext / vector_relational.inl
1020 B、30行 生 Blame 履歴
1#include "../vector_relational.hpp"
2#include "../common.hpp"
3#include "../detail/qualifier.hpp"
4
5namespace glm
6{
7 template<length_t L, typename T, qualifier Q>
8 GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, bool, Q> equal(vec<L, T, Q> const& x, vec<L, T, Q> const& y, T Epsilon)
9 {
10 return equal(x, y, vec<L, T, Q>(Epsilon));
11 }
12
13 template<length_t L, typename T, qualifier Q>
14 GLM_FUNC_QUALIFIER 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)
15 {
16 return lessThanEqual(abs(x - y), Epsilon);
17 }
18
19 template<length_t L, typename T, qualifier Q>
20 GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<L, bool, Q> notEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y, T Epsilon)
21 {
22 return notEqual(x, y, vec<L, T, Q>(Epsilon));
23 }
24
25 template<length_t L, typename T, qualifier Q>
26 GLM_FUNC_QUALIFIER 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)
27 {
28 return greaterThan(abs(x - y), Epsilon);
29 }
30}//namespace glm