master
ブランチ master
ShaderPlayground / deps / glm / glm / gtc / epsilon.hpp
1.7 KB、60行 生 Blame 履歴
1/// @ref gtc_epsilon
2/// @file glm/gtc/epsilon.hpp
3///
4/// @see core (dependence)
5/// @see gtc_quaternion (dependence)
6///
7/// @defgroup gtc_epsilon GLM_GTC_epsilon
8/// @ingroup gtc
9///
10/// Include <glm/gtc/epsilon.hpp> to use the features of this extension.
11///
12/// Comparison functions for a user defined epsilon values.
13
14#pragma once
15
16// Dependencies
17#include "../detail/setup.hpp"
18#include "../detail/qualifier.hpp"
19
20#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)
21# pragma message("GLM: GLM_GTC_epsilon extension included")
22#endif
23
24namespace glm
25{
26 /// @addtogroup gtc_epsilon
27 /// @{
28
29 /// Returns the component-wise comparison of |x - y| < epsilon.
30 /// True if this expression is satisfied.
31 ///
32 /// @see gtc_epsilon
33 template<length_t L, typename T, qualifier Q>
34 GLM_FUNC_DECL vec<L, bool, Q> epsilonEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y, T const& epsilon);
35
36 /// Returns the component-wise comparison of |x - y| < epsilon.
37 /// True if this expression is satisfied.
38 ///
39 /// @see gtc_epsilon
40 template<typename genType>
41 GLM_FUNC_DECL bool epsilonEqual(genType const& x, genType const& y, genType const& epsilon);
42
43 /// Returns the component-wise comparison of |x - y| < epsilon.
44 /// True if this expression is not satisfied.
45 ///
46 /// @see gtc_epsilon
47 template<length_t L, typename T, qualifier Q>
48 GLM_FUNC_DECL vec<L, bool, Q> epsilonNotEqual(vec<L, T, Q> const& x, vec<L, T, Q> const& y, T const& epsilon);
49
50 /// Returns the component-wise comparison of |x - y| >= epsilon.
51 /// True if this expression is not satisfied.
52 ///
53 /// @see gtc_epsilon
54 template<typename genType>
55 GLM_FUNC_DECL bool epsilonNotEqual(genType const& x, genType const& y, genType const& epsilon);
56
57 /// @}
58}//namespace glm
59
60#include "epsilon.inl"