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
651 B

5 years ago
  1. #include <glm/gtx/functions.hpp>
  2. #include <glm/ext/vector_float2.hpp>
  3. #include <vector>
  4. int test_gauss_1d()
  5. {
  6. int Error = 0;
  7. std::vector<float> Result(20);
  8. for(std::size_t i = 0, n = Result.size(); i < n; ++i)
  9. Result[i] = glm::gauss(static_cast<float>(i) * 0.1f, 0.0f, 1.0f);
  10. return Error;
  11. }
  12. int test_gauss_2d()
  13. {
  14. int Error = 0;
  15. std::vector<float> Result(20);
  16. for(std::size_t i = 0, n = Result.size(); i < n; ++i)
  17. Result[i] = glm::gauss(glm::vec2(static_cast<float>(i)) * 0.1f, glm::vec2(0.0f), glm::vec2(1.0f));
  18. return Error;
  19. }
  20. int main()
  21. {
  22. int Error = 0;
  23. Error += test_gauss_1d();
  24. Error += test_gauss_2d();
  25. return Error;
  26. }