Platformer in OpenGL
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
637 B

5 years ago
  1. #include <glm/ext/scalar_constants.hpp>
  2. template <typename valType>
  3. static int test_epsilon()
  4. {
  5. int Error = 0;
  6. valType const Test = glm::epsilon<valType>();
  7. Error += Test > static_cast<valType>(0) ? 0 : 1;
  8. return Error;
  9. }
  10. template <typename valType>
  11. static int test_pi()
  12. {
  13. int Error = 0;
  14. valType const Test = glm::pi<valType>();
  15. Error += Test > static_cast<valType>(3.14) ? 0 : 1;
  16. Error += Test < static_cast<valType>(3.15) ? 0 : 1;
  17. return Error;
  18. }
  19. int main()
  20. {
  21. int Error = 0;
  22. Error += test_epsilon<float>();
  23. Error += test_epsilon<double>();
  24. Error += test_pi<float>();
  25. Error += test_pi<double>();
  26. return Error;
  27. }