Fixed GTC_epsilon with Clang

This commit is contained in:
Christophe Riccio 2012-11-14 12:02:24 +01:00
parent 0b745d4e1c
commit 2f8f070597
2 changed files with 26 additions and 19 deletions

View File

@ -56,19 +56,35 @@ namespace glm
/// Returns the component-wise compare of |x - y| < epsilon.
/// @see gtc_epsilon
template <typename genTypeT, typename genTypeU, typename boolType>
boolType epsilonEqual(
genTypeT const & x,
genTypeT const & y,
genTypeU const & epsilon);
template <typename genType>
typename genType::boolType epsilonEqual(
genType const & x,
genType const & y,
typename genType::value_type const & epsilon);
/// Returns the component-wise compare of |x - y| < epsilon.
/// @see gtc_epsilon
template <typename genType>
typename genType::boolType epsilonEqual(
genType const & x,
genType const & y,
genType const & epsilon);
/// Returns the component-wise compare of |x - y| < epsilon.
/// @see gtc_epsilon
template <typename genType>
typename genType::boolType epsilonNotEqual(
genType const & x,
genType const & y,
typename genType::value_type const & epsilon);
/// Returns the component-wise compare of |x - y| >= epsilon.
/// @see gtc_epsilon
template <typename genTypeT, typename genTypeU, typename boolType>
boolType epsilonNotEqual(
genTypeT const & x,
genTypeT const & y,
genTypeU const & epsilon);
template <typename genType>
typename genType::boolType epsilonNotEqual(
genType const & x,
genType const & y,
genType const & epsilon);
/// @}
}//namespace glm

View File

@ -28,7 +28,6 @@
namespace glm
{
template <>
GLM_FUNC_QUALIFIER bool epsilonEqual
(
glm::half const & x,
@ -39,7 +38,6 @@ namespace glm
return abs(x - y) < epsilon;
}
template <>
GLM_FUNC_QUALIFIER bool epsilonEqual
(
float const & x,
@ -50,7 +48,6 @@ namespace glm
return abs(x - y) < epsilon;
}
template <>
GLM_FUNC_QUALIFIER bool epsilonEqual
(
double const & x,
@ -61,7 +58,6 @@ namespace glm
return abs(x - y) < epsilon;
}
template <>
GLM_FUNC_QUALIFIER bool epsilonNotEqual
(
glm::half const & x,
@ -72,7 +68,6 @@ namespace glm
return abs(x - y) >= epsilon;
}
template <>
GLM_FUNC_QUALIFIER bool epsilonNotEqual
(
float const & x,
@ -83,7 +78,6 @@ namespace glm
return abs(x - y) >= epsilon;
}
template <>
GLM_FUNC_QUALIFIER bool epsilonNotEqual
(
double const & x,
@ -260,7 +254,6 @@ namespace glm
abs(x.w - y.w) >= epsilon.w);
}
/*
template <typename valType>
GLM_FUNC_QUALIFIER detail::tvec4<bool> epsilonEqual
(
@ -290,6 +283,4 @@ namespace glm
abs(x.z - y.z) >= epsilon.z,
abs(x.w - y.w) >= epsilon.w);
}
*/
}//namespace glm