master
ブランチ master
ShaderPlayground / deps / glm / glm / ext / vector_relational.hpp
2.6 KB、68行 生 Blame 履歴
1/// @ref ext_vector_relational
2/// @file glm/ext/vector_relational.hpp
3///
4/// @defgroup ext_vector_relational GLM_EXT_vector_relational
5/// @ingroup ext
6///
7/// Exposes comparison functions for vector types that take a user defined epsilon values.
8///
9/// Include <glm/ext/vector_relational.hpp> to use the features of this extension.
10///
11/// @see core_vector_relational
12/// @see ext_scalar_relational
13/// @see ext_matrix_relational
14
15#pragma once
16
17// Dependencies
18#include "../detail/qualifier.hpp"
19
20#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
21# pragma message("GLM: GLM_EXT_vector_relational extension included")
22#endif
23
24namespace glm
25{
26 /// @addtogroup ext_vector_relational
27 /// @{
28
29 /// Returns the component-wise comparison of |x - y| < epsilon.
30 /// True if this expression is satisfied.
31 ///
32 /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
33 /// @tparam T Floating-point or integer scalar types
34 /// @tparam Q Value from qualifier enum
35 template<length_t L, typename T, qualifier Q>
36 GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> equal(vec<L, T, Q> const& x, vec<L, T, Q> const& y, T epsilon);
37
38 /// Returns the component-wise comparison of |x - y| < epsilon.
39 /// True if this expression is satisfied.
40 ///
41 /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
42 /// @tparam T Floating-point or integer scalar types
43 /// @tparam Q Value from qualifier enum
44 template<length_t L, typename T, qualifier Q>
45 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);
46
47 /// Returns the component-wise comparison of |x - y| >= epsilon.
48 /// True if this expression is not satisfied.
49 ///
50 /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
51 /// @tparam T Floating-point or integer scalar types
52 /// @tparam Q Value from qualifier enum
53 template<length_t L, typename T, qualifier Q>
54 GLM_FUNC_DECL GLM_CONSTEXPR vec<L, bool, Q> notEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y, T epsilon);
55
56 /// Returns the component-wise comparison of |x - y| >= epsilon.
57 /// True if this expression is not satisfied.
58 ///
59 /// @tparam L Integer between 1 and 4 included that qualify the dimension of the vector
60 /// @tparam T Floating-point or integer scalar types
61 /// @tparam Q Value from qualifier enum
62 template<length_t L, typename T, qualifier Q>
63 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);
64
65 /// @}
66}//namespace glm
67
68#include "vector_relational.inl"