Fixed build

This commit is contained in:
Christophe Riccio 2011-09-25 02:25:26 +01:00
parent 387854dbe3
commit ca88ff50dd
2 changed files with 17 additions and 2 deletions

View File

@ -92,8 +92,8 @@ GLM_FUNC_QUALIFIER genType gaussRand
do
{
x1 = compRand1(genType(-1), genType(1));
x2 = compRand1(genType(-1), genType(1));
x1 = linearRand(genType(-1), genType(1));
x2 = linearRand(genType(-1), genType(1));
w = x1 * x1 + x2 * x2;
} while(w > genType(1));

View File

@ -69,6 +69,7 @@ int test_sphericalRand()
double ResultDoubleA = 0.0f;
double ResultDoubleB = 0.0f;
double ResultDoubleC = 0.0f;
for(std::size_t i = 0; i < Max; ++i)
{
ResultFloatA += glm::length(glm::sphericalRand(1.0f));
@ -98,6 +99,7 @@ int test_diskRand()
{
float ResultFloat = 0.0f;
double ResultDouble = 0.0f;
for(std::size_t i = 0; i < 100000; ++i)
{
ResultFloat += glm::length(glm::diskRand(2.0f));
@ -116,7 +118,20 @@ int test_ballRand()
{
int Error = 0;
{
float ResultFloat = 0.0f;
double ResultDouble = 0.0f;
for(std::size_t i = 0; i < 100000; ++i)
{
ResultFloat += glm::length(glm::ballRand(2.0f));
ResultDouble += glm::length(glm::ballRand(2.0));
}
Error += ResultFloat < 200000.f ? 0 : 1;
Error += ResultDouble < 200000.0 ? 0 : 1;
assert(!Error);
}
return Error;
}