Fixed 32-bits build #528 #529, fixed VC 32 bits crash

This commit is contained in:
Christophe Riccio
2016-08-07 12:42:45 +02:00
parent e671d50e05
commit 0dbdf3fad4
3 changed files with 32 additions and 7 deletions

View File

@@ -955,12 +955,37 @@ namespace sign
return Error;
}
int test_f32vec4()
{
type<glm::vec4> const Data[] =
{
{glm::vec4( 1), glm::vec4( 1)},
{glm::vec4( 0), glm::vec4( 0)},
{glm::vec4( 2), glm::vec4( 1)},
{glm::vec4( 3), glm::vec4( 1)},
{glm::vec4(-1), glm::vec4(-1)},
{glm::vec4(-2), glm::vec4(-1)},
{glm::vec4(-3), glm::vec4(-1)}
};
int Error = 0;
for(std::size_t i = 0; i < sizeof(Data) / sizeof(type<glm::vec4>); ++i)
{
glm::vec4 Result = glm::sign(Data[i].Value);
Error += glm::all(glm::equal(Data[i].Return, Result)) ? 0 : 1;
}
return Error;
}
int test()
{
int Error = 0;
Error += test_int32();
Error += test_i32vec4();
Error += test_f32vec4();
return Error;
}