diff --git a/glm/gtx/ulp.inl b/glm/gtx/ulp.inl index b223e543..0e1346e9 100644 --- a/glm/gtx/ulp.inl +++ b/glm/gtx/ulp.inl @@ -8,6 +8,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////// #include +#include namespace glm{ namespace gtx{ @@ -36,7 +37,10 @@ namespace ulp std::size_t Count = 0; float Temp = a; while((Temp = nextafterf(Temp, b)) != b) + { + std::cout << Temp << " " << b << std::endl; ++Count; + } return Count; } @@ -49,7 +53,10 @@ namespace ulp std::size_t Count = 0; double Temp = a; while((Temp = nextafter(Temp, b)) != b) + { + std::cout << Temp << " " << b << std::endl; ++Count; + } return Count; } diff --git a/test/gtx/gtx-ulp.cpp b/test/gtx/gtx-ulp.cpp index 753f5729..5c8ed883 100644 --- a/test/gtx/gtx-ulp.cpp +++ b/test/gtx/gtx-ulp.cpp @@ -13,6 +13,9 @@ int test_ulp_float() { + double Temp = nextafter(0.02, 0.01); + std::cout << Temp << " 0.01, 0.02" << std::endl; + std::size_t A = glm::ulp(0.01, 0.02); std::size_t B = glm::ulp(glm::vec2(0.01), glm::vec2(0.02)); std::size_t C = glm::ulp(glm::vec3(0.01), glm::vec3(0.02)); @@ -26,6 +29,7 @@ int test_ulp_float() int main() { + std::cout << "Test 76" << std::endl; test_ulp_float(); }