gtc_constants.cpp 938 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. ///////////////////////////////////////////////////////////////////////////////////////////////////
  2. // OpenGL Mathematics Copyright (c) 2005 - 2013 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/glm.hpp>
  10. #include <glm/gtc/constants.hpp>
  11. int test_epsilon()
  12. {
  13. int Error(0);
  14. {
  15. glm::half Test = glm::epsilon<glm::half>();
  16. }
  17. {
  18. float Test = glm::epsilon<float>();
  19. }
  20. {
  21. double Test = glm::epsilon<double>();
  22. }
  23. return Error;
  24. }
  25. int main()
  26. {
  27. int Error(0);
  28. float MinHalf = 0.0f;
  29. while (glm::half(MinHalf) == glm::half(0.0f))
  30. MinHalf += std::numeric_limits<float>::epsilon();
  31. return Error;
  32. }