mirror of
https://github.com/g-truc/glm.git
synced 2024-11-23 01:14:34 +00:00
Fixed ticket #104, dependence between GTX_epsilon and GTC_quaternion
This commit is contained in:
parent
54e8df2ff3
commit
6c9364c2e8
@ -8,7 +8,8 @@
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Dependency:
|
||||
// - GLM core
|
||||
// - GLM_GTX_half
|
||||
// - GLM_GTC_half_float
|
||||
// - GLM_GTC_quaternion
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef glm_gtx_epsilon
|
||||
@ -17,6 +18,7 @@
|
||||
// Dependency:
|
||||
#include "../glm.hpp"
|
||||
#include "../gtc/half_float.hpp"
|
||||
#include "../gtc/quaternion.hpp"
|
||||
|
||||
#if(defined(GLM_MESSAGES) && !defined(glm_ext))
|
||||
# pragma message("GLM: GLM_GTX_epsilon extension included")
|
||||
|
@ -157,6 +157,21 @@ GLM_FUNC_QUALIFIER detail::tvec4<bool> equalEpsilon
|
||||
abs(x.w - y.w) < epsilon.w);
|
||||
}
|
||||
|
||||
template <typename valType>
|
||||
GLM_FUNC_QUALIFIER detail::tvec4<bool> equalEpsilon
|
||||
(
|
||||
detail::tquat<valType> const & x,
|
||||
detail::tquat<valType> const & y,
|
||||
detail::tquat<valType> const & epsilon
|
||||
)
|
||||
{
|
||||
return detail::tvec4<bool>(
|
||||
abs(x.x - y.x) < epsilon.x,
|
||||
abs(x.y - y.y) < epsilon.y,
|
||||
abs(x.z - y.z) < epsilon.z,
|
||||
abs(x.w - y.w) < epsilon.w);
|
||||
}
|
||||
|
||||
template <typename valType>
|
||||
GLM_FUNC_QUALIFIER detail::tvec2<bool> notEqualEpsilon
|
||||
(
|
||||
@ -199,6 +214,21 @@ GLM_FUNC_QUALIFIER detail::tvec4<bool> notEqualEpsilon
|
||||
abs(x.w - y.w) >= epsilon.w);
|
||||
}
|
||||
|
||||
template <typename valType>
|
||||
GLM_FUNC_QUALIFIER detail::tvec4<bool> notEqualEpsilon
|
||||
(
|
||||
detail::tquat<valType> const & x,
|
||||
detail::tquat<valType> const & y,
|
||||
detail::tquat<valType> const & epsilon
|
||||
)
|
||||
{
|
||||
return detail::tvec4<bool>(
|
||||
abs(x.x - y.x) >= epsilon.x,
|
||||
abs(x.y - y.y) >= epsilon.y,
|
||||
abs(x.z - y.z) >= epsilon.z,
|
||||
abs(x.w - y.w) >= epsilon.w);
|
||||
}
|
||||
|
||||
}//namespace epsilon
|
||||
}//namespace gtx
|
||||
}//namespace glm
|
||||
|
Loading…
Reference in New Issue
Block a user