diff options
author | 2016-09-03 14:39:25 +0200 | |
---|---|---|
committer | 2016-09-03 14:39:25 +0200 | |
commit | 73793c599cd22e8a265bd4d8d19a50d2c9104dd5 (patch) | |
tree | dc815ac7824005031c697a4e23b2e6e1a2e3e8cf /3rdparty/glm/test/gtc/gtc_functions.cpp | |
parent | 2869b107c7bbbd578e3832a6486657b878745b1c (diff) |
Update GLM to latest (nw)
Diffstat (limited to '3rdparty/glm/test/gtc/gtc_functions.cpp')
-rw-r--r-- | 3rdparty/glm/test/gtc/gtc_functions.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/3rdparty/glm/test/gtc/gtc_functions.cpp b/3rdparty/glm/test/gtc/gtc_functions.cpp new file mode 100644 index 00000000000..0bdf8ab5871 --- /dev/null +++ b/3rdparty/glm/test/gtc/gtc_functions.cpp @@ -0,0 +1,35 @@ +#include <glm/gtc/functions.hpp> +#include <vector> + +int test_gauss_1d() +{ + int Error = 0; + + std::vector<float> Result(20); + for(std::size_t i = 0, n = Result.size(); i < n; ++i) + Result[i] = glm::gauss(static_cast<float>(i) * 0.1f, 0.0f, 1.0f); + + return Error; +} + +int test_gauss_2d() +{ + int Error = 0; + + std::vector<float> Result(20); + for(std::size_t i = 0, n = Result.size(); i < n; ++i) + Result[i] = glm::gauss(glm::vec2(i) * 0.1f, glm::vec2(0.0f), glm::vec2(1.0f)); + + return Error; +} + +int main() +{ + int Error = 0; + + Error += test_gauss_1d(); + Error += test_gauss_2d(); + + return Error; +} + |