Clutter Engine 0.0.1
Loading...
Searching...
No Matches
matrix_relational.inl
1
3
4// Dependency:
6#include "../common.hpp"
7
8namespace glm
9{
10 template<length_t C, length_t R, typename T, qualifier Q>
11 GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<C, bool, Q> equal(mat<C, R, T, Q> const& a, mat<C, R, T, Q> const& b)
12 {
13 return equal(a, b, static_cast<T>(0));
14 }
15
16 template<length_t C, length_t R, typename T, qualifier Q>
17 GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<C, bool, Q> equal(mat<C, R, T, Q> const& a, mat<C, R, T, Q> const& b, T Epsilon)
18 {
19 return equal(a, b, vec<C, T, Q>(Epsilon));
20 }
21
22 template<length_t C, length_t R, typename T, qualifier Q>
23 GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<C, bool, Q> equal(mat<C, R, T, Q> const& a, mat<C, R, T, Q> const& b, vec<C, T, Q> const& Epsilon)
24 {
25 vec<C, bool, Q> Result(true);
26 for(length_t i = 0; i < C; ++i)
27 Result[i] = all(equal(a[i], b[i], Epsilon[i]));
28 return Result;
29 }
30
31 template<length_t C, length_t R, typename T, qualifier Q>
32 GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<C, bool, Q> notEqual(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y)
33 {
34 return notEqual(x, y, static_cast<T>(0));
35 }
36
37 template<length_t C, length_t R, typename T, qualifier Q>
38 GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<C, bool, Q> notEqual(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y, T Epsilon)
39 {
40 return notEqual(x, y, vec<C, T, Q>(Epsilon));
41 }
42
43 template<length_t C, length_t R, typename T, qualifier Q>
44 GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<C, bool, Q> notEqual(mat<C, R, T, Q> const& a, mat<C, R, T, Q> const& b, vec<C, T, Q> const& Epsilon)
45 {
46 vec<C, bool, Q> Result(true);
47 for(length_t i = 0; i < C; ++i)
48 Result[i] = any(notEqual(a[i], b[i], Epsilon[i]));
49 return Result;
50 }
51
52 template<length_t C, length_t R, typename T, qualifier Q>
53 GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<C, bool, Q> equal(mat<C, R, T, Q> const& a, mat<C, R, T, Q> const& b, int MaxULPs)
54 {
55 return equal(a, b, vec<C, int, Q>(MaxULPs));
56 }
57
58 template<length_t C, length_t R, typename T, qualifier Q>
59 GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<C, bool, Q> equal(mat<C, R, T, Q> const& a, mat<C, R, T, Q> const& b, vec<C, int, Q> const& MaxULPs)
60 {
61 vec<C, bool, Q> Result(true);
62 for(length_t i = 0; i < C; ++i)
63 Result[i] = all(equal(a[i], b[i], MaxULPs[i]));
64 return Result;
65 }
66
67 template<length_t C, length_t R, typename T, qualifier Q>
68 GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<C, bool, Q> notEqual(mat<C, R, T, Q> const& x, mat<C, R, T, Q> const& y, int MaxULPs)
69 {
70 return notEqual(x, y, vec<C, int, Q>(MaxULPs));
71 }
72
73 template<length_t C, length_t R, typename T, qualifier Q>
74 GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<C, bool, Q> notEqual(mat<C, R, T, Q> const& a, mat<C, R, T, Q> const& b, vec<C, int, Q> const& MaxULPs)
75 {
76 vec<C, bool, Q> Result(true);
77 for(length_t i = 0; i < C; ++i)
78 Result[i] = any(notEqual(a[i], b[i], MaxULPs[i]));
79 return Result;
80 }
81
82}//namespace glm
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec< L, bool, Q > notEqual(vec< L, T, Q > const &x, vec< L, T, Q > const &y)
Definition func_vector_relational.inl:49
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool all(vec< L, bool, Q > const &v)
Definition func_vector_relational.inl:67
GLM_FUNC_QUALIFIER GLM_CONSTEXPR bool any(vec< L, bool, Q > const &v)
Definition func_vector_relational.inl:58
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec< L, bool, Q > equal(vec< L, T, Q > const &x, vec< L, T, Q > const &y)
Definition func_vector_relational.inl:40
Core features
Definition common.hpp:21
Definition qualifier.hpp:36
Definition qualifier.hpp:35