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.

66 lines
976 B

5 years ago
  1. #define GLM_ENABLE_EXPERIMENTAL
  2. #include <glm/gtx/matrix_query.hpp>
  3. int test_isNull()
  4. {
  5. int Error(0);
  6. bool TestA = glm::isNull(glm::mat4(0), 0.00001f);
  7. Error += TestA ? 0 : 1;
  8. return Error;
  9. }
  10. int test_isIdentity()
  11. {
  12. int Error(0);
  13. {
  14. bool TestA = glm::isIdentity(glm::mat2(1), 0.00001f);
  15. Error += TestA ? 0 : 1;
  16. }
  17. {
  18. bool TestA = glm::isIdentity(glm::mat3(1), 0.00001f);
  19. Error += TestA ? 0 : 1;
  20. }
  21. {
  22. bool TestA = glm::isIdentity(glm::mat4(1), 0.00001f);
  23. Error += TestA ? 0 : 1;
  24. }
  25. return Error;
  26. }
  27. int test_isNormalized()
  28. {
  29. int Error(0);
  30. bool TestA = glm::isNormalized(glm::mat4(1), 0.00001f);
  31. Error += TestA ? 0 : 1;
  32. return Error;
  33. }
  34. int test_isOrthogonal()
  35. {
  36. int Error(0);
  37. bool TestA = glm::isOrthogonal(glm::mat4(1), 0.00001f);
  38. Error += TestA ? 0 : 1;
  39. return Error;
  40. }
  41. int main()
  42. {
  43. int Error(0);
  44. Error += test_isNull();
  45. Error += test_isIdentity();
  46. Error += test_isNormalized();
  47. Error += test_isOrthogonal();
  48. return Error;
  49. }