- Improved API documentation #668

This commit is contained in:
Christophe Riccio
2017-08-17 16:24:32 +02:00
parent b9936ac0ca
commit d93a3be4ac
97 changed files with 265 additions and 240 deletions

View File

@@ -14,6 +14,7 @@ glmCreateTestGTC(gtx_exterior_product)
glmCreateTestGTC(gtx_fast_exponential)
glmCreateTestGTC(gtx_fast_square_root)
glmCreateTestGTC(gtx_fast_trigonometry)
glmCreateTestGTC(gtx_functions)
glmCreateTestGTC(gtx_gradient_paint)
glmCreateTestGTC(gtx_handed_coordinate_space)
glmCreateTestGTC(gtx_integer)

View File

@@ -0,0 +1,35 @@
#include <glm/gtx/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(static_cast<float>(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;
}