diff --git a/glm/gtc/packing.inl b/glm/gtc/packing.inl index 62bdc07c..90501bfe 100644 --- a/glm/gtc/packing.inl +++ b/glm/gtc/packing.inl @@ -1,8 +1,8 @@ /// @ref gtc_packing /// @file glm/gtc/packing.inl +#include "../ext/vector_relational.hpp" #include "../common.hpp" -#include "../vector_relational.hpp" #include "../vec2.hpp" #include "../vec3.hpp" #include "../vec4.hpp" diff --git a/glm/gtc/ulp.hpp b/glm/gtc/ulp.hpp index 952a4628..02aea3f5 100644 --- a/glm/gtc/ulp.hpp +++ b/glm/gtc/ulp.hpp @@ -18,7 +18,7 @@ #include "../detail/setup.hpp" #include "../detail/qualifier.hpp" #include "../detail/type_int.hpp" -#include "../detail/compute_vector_relational.hpp" +#include "../ext/vector_relational.hpp" #if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED) # pragma message("GLM: GLM_GTC_ulp extension included") diff --git a/glm/gtc/ulp.inl b/glm/gtc/ulp.inl index dff2e2f3..4851a696 100644 --- a/glm/gtc/ulp.inl +++ b/glm/gtc/ulp.inl @@ -82,13 +82,13 @@ namespace detail if((ix>0x7f800000) || // x is nan (iy>0x7f800000)) // y is nan return x+y; - if(equal(x, y, epsilon())) + if(abs(y - x) <= epsilon()) return y; // x=y, return y if(ix==0) { // x == 0 GLM_SET_FLOAT_WORD(x,(hy&0x80000000)|1);// return +-minsubnormal t = x*x; - if(equal(t, x, epsilon())) + if(abs(t - x) <= epsilon()) return t; else return x; // raise underflow flag @@ -113,7 +113,7 @@ namespace detail if(hy<0x00800000) // underflow { t = x*x; - if(!detail::compute_equal::call(t, x)) + if(abs(t - x) > epsilon()) { // raise underflow flag GLM_SET_FLOAT_WORD(y,hx); return y; @@ -137,13 +137,13 @@ namespace detail if(((ix>=0x7ff00000)&&((ix-0x7ff00000)|lx)!=0) || // x is nan ((iy>=0x7ff00000)&&((iy-0x7ff00000)|ly)!=0)) // y is nan return x+y; - if(equal(x, y, epsilon())) + if(abs(y - x) <= epsilon()) return y; // x=y, return y if((ix|lx)==0) { // x == 0 GLM_INSERT_WORDS(x, hy & 0x80000000, 1); // return +-minsubnormal t = x*x; - if(equal(t, x, epsilon())) + if(abs(t - x) <= epsilon()) return t; else return x; // raise underflow flag @@ -171,7 +171,7 @@ namespace detail if(hy<0x00100000) { // underflow t = x*x; - if(!detail::compute_equal::call(t, x)) + if(abs(t - x) > epsilon()) { // raise underflow flag GLM_INSERT_WORDS(y,hx,lx); return y;