From 2877f4eda3d1b0c7431039e3142ecf1a282a34b1 Mon Sep 17 00:00:00 2001 From: LaG1924 <12997935+LaG1924@users.noreply.github.com> Date: Tue, 21 Aug 2018 20:40:38 +0500 Subject: Update glm to 0.9.9.0 --- external/include/glm/gtc/epsilon.inl | 112 +++++++++++------------------------ 1 file changed, 35 insertions(+), 77 deletions(-) (limited to 'external/include/glm/gtc/epsilon.inl') diff --git a/external/include/glm/gtc/epsilon.inl b/external/include/glm/gtc/epsilon.inl index b5577d9..2478cab 100644 --- a/external/include/glm/gtc/epsilon.inl +++ b/external/include/glm/gtc/epsilon.inl @@ -5,121 +5,79 @@ #include "quaternion.hpp" #include "../vector_relational.hpp" #include "../common.hpp" -#include "../vec2.hpp" -#include "../vec3.hpp" -#include "../vec4.hpp" +#include "../detail/type_vec.hpp" namespace glm { - template <> + template<> GLM_FUNC_QUALIFIER bool epsilonEqual ( - float const & x, - float const & y, - float const & epsilon + float const& x, + float const& y, + float const& epsilon ) { return abs(x - y) < epsilon; } - template <> + template<> GLM_FUNC_QUALIFIER bool epsilonEqual ( - double const & x, - double const & y, - double const & epsilon + double const& x, + double const& y, + double const& epsilon ) { return abs(x - y) < epsilon; } - template <> - GLM_FUNC_QUALIFIER bool epsilonNotEqual - ( - float const & x, - float const & y, - float const & epsilon - ) + template + GLM_FUNC_QUALIFIER vec epsilonEqual(vec const& x, vec const& y, T const& epsilon) { - return abs(x - y) >= epsilon; + return lessThan(abs(x - y), vec(epsilon)); } - template <> - GLM_FUNC_QUALIFIER bool epsilonNotEqual - ( - double const & x, - double const & y, - double const & epsilon - ) + template + GLM_FUNC_QUALIFIER vec epsilonEqual(vec const& x, vec const& y, vec const& epsilon) { - return abs(x - y) >= epsilon; + return lessThan(abs(x - y), vec(epsilon)); } - template class vecType> - GLM_FUNC_QUALIFIER vecType epsilonEqual - ( - vecType const & x, - vecType const & y, - T const & epsilon - ) + template<> + GLM_FUNC_QUALIFIER bool epsilonNotEqual(float const& x, float const& y, float const& epsilon) { - return lessThan(abs(x - y), vecType(epsilon)); + return abs(x - y) >= epsilon; } - template class vecType> - GLM_FUNC_QUALIFIER vecType epsilonEqual - ( - vecType const & x, - vecType const & y, - vecType const & epsilon - ) + template<> + GLM_FUNC_QUALIFIER bool epsilonNotEqual(double const& x, double const& y, double const& epsilon) { - return lessThan(abs(x - y), vecType(epsilon)); + return abs(x - y) >= epsilon; } - template class vecType> - GLM_FUNC_QUALIFIER vecType epsilonNotEqual - ( - vecType const & x, - vecType const & y, - T const & epsilon - ) + template + GLM_FUNC_QUALIFIER vec epsilonNotEqual(vec const& x, vec const& y, T const& epsilon) { - return greaterThanEqual(abs(x - y), vecType(epsilon)); + return greaterThanEqual(abs(x - y), vec(epsilon)); } - template class vecType> - GLM_FUNC_QUALIFIER vecType epsilonNotEqual - ( - vecType const & x, - vecType const & y, - vecType const & epsilon - ) + template + GLM_FUNC_QUALIFIER vec epsilonNotEqual(vec const& x, vec const& y, vec const& epsilon) { - return greaterThanEqual(abs(x - y), vecType(epsilon)); + return greaterThanEqual(abs(x - y), vec(epsilon)); } - template - GLM_FUNC_QUALIFIER tvec4 epsilonEqual - ( - tquat const & x, - tquat const & y, - T const & epsilon - ) + template + GLM_FUNC_QUALIFIER vec<4, bool, Q> epsilonEqual(tquat const& x, tquat const& y, T const& epsilon) { - tvec4 v(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w); - return lessThan(abs(v), tvec4(epsilon)); + vec<4, T, Q> v(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w); + return lessThan(abs(v), vec<4, T, Q>(epsilon)); } - template - GLM_FUNC_QUALIFIER tvec4 epsilonNotEqual - ( - tquat const & x, - tquat const & y, - T const & epsilon - ) + template + GLM_FUNC_QUALIFIER vec<4, bool, Q> epsilonNotEqual(tquat const& x, tquat const& y, T const& epsilon) { - tvec4 v(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w); - return greaterThanEqual(abs(v), tvec4(epsilon)); + vec<4, T, Q> v(x.x - y.x, x.y - y.y, x.z - y.z, x.w - y.w); + return greaterThanEqual(abs(v), vec<4, T, Q>(epsilon)); } }//namespace glm -- cgit v1.2.3