glm/test/gtx/gtx_functions.cpp

36 lines
614 B
C++
Raw Normal View History

2017-08-17 14:24:32 +00:00
#include <glm/gtx/functions.hpp>
2016-07-14 13:20:44 +00:00
#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)
2016-11-24 23:37:32 +00:00
Result[i] = glm::gauss(glm::vec2(static_cast<float>(i)) * 0.1f, glm::vec2(0.0f), glm::vec2(1.0f));
2016-07-14 13:20:44 +00:00
return Error;
}
int main()
{
int Error = 0;
Error += test_gauss_1d();
Error += test_gauss_2d();
return Error;
}