gtc_constants.cpp 895 B

12345678910111213141516171819202122232425262728293031323334353637
  1. ///////////////////////////////////////////////////////////////////////////////////////////////////
  2. // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)
  3. ///////////////////////////////////////////////////////////////////////////////////////////////////
  4. // Created : 2012-09-19
  5. // Updated : 2012-12-13
  6. // Licence : This source is under MIT licence
  7. // File : test/gtc/constants.cpp
  8. ///////////////////////////////////////////////////////////////////////////////////////////////////
  9. #include <glm/gtc/constants.hpp>
  10. int test_epsilon()
  11. {
  12. int Error(0);
  13. {
  14. float Test = glm::epsilon<float>();
  15. }
  16. {
  17. double Test = glm::epsilon<double>();
  18. }
  19. return Error;
  20. }
  21. int main()
  22. {
  23. int Error(0);
  24. //float MinHalf = 0.0f;
  25. //while (glm::half(MinHalf) == glm::half(0.0f))
  26. // MinHalf += std::numeric_limits<float>::epsilon();
  27. Error += test_epsilon();
  28. return Error;
  29. }