mirror of
https://github.com/g-truc/glm.git
synced 2024-11-23 09:14:34 +00:00
Updated linearRand test
This commit is contained in:
parent
3aefc82e95
commit
7df14e51dd
@ -8,7 +8,7 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include <glm/glm.hpp>
|
#include <glm/glm.hpp>
|
||||||
#include <glm/gtx/random.hpp>
|
#include <glm/gtc/random.hpp>
|
||||||
#include <glm/gtx/epsilon.hpp>
|
#include <glm/gtx/epsilon.hpp>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
@ -21,8 +21,8 @@ int test_signedRand1()
|
|||||||
double ResultDouble = 0.0f;
|
double ResultDouble = 0.0f;
|
||||||
for(std::size_t i = 0; i < 100000; ++i)
|
for(std::size_t i = 0; i < 100000; ++i)
|
||||||
{
|
{
|
||||||
ResultFloat += glm::signedRand1<float>(/*-1.0f, 1.0f*/);
|
ResultFloat += glm::linearRand(-1.0f, 1.0f);
|
||||||
ResultDouble += glm::signedRand1<double>(/*-1.0, 1.0*/);
|
ResultDouble += glm::linearRand(-1.0, 1.0);
|
||||||
}
|
}
|
||||||
|
|
||||||
Error += glm::equalEpsilon(ResultFloat, 0.0f, 0.0001f);
|
Error += glm::equalEpsilon(ResultFloat, 0.0f, 0.0001f);
|
||||||
|
Loading…
Reference in New Issue
Block a user