Moved bounded function to GTX_common from EXT_vector_relational as there are quite new

This commit is contained in:
Christophe Riccio
2018-05-08 13:34:22 +02:00
parent 77acd2fe40
commit 4d4dbcade6
12 changed files with 275 additions and 126 deletions

View File

@@ -126,12 +126,36 @@ int test_isdenormal()
return Error;
}
int test_openBounded()
{
int Error = 0;
Error += glm::all(glm::openBounded(glm::ivec2(2), glm::ivec2(1), glm::ivec2(3))) ? 0 : 1;
Error += !glm::all(glm::openBounded(glm::ivec2(1), glm::ivec2(1), glm::ivec2(3))) ? 0 : 1;
Error += !glm::all(glm::openBounded(glm::ivec2(3), glm::ivec2(1), glm::ivec2(3))) ? 0 : 1;
return Error;
}
int test_closeBounded()
{
int Error = 0;
Error += glm::all(glm::closeBounded(glm::ivec2(2), glm::ivec2(1), glm::ivec2(3))) ? 0 : 1;
Error += glm::all(glm::closeBounded(glm::ivec2(1), glm::ivec2(1), glm::ivec2(3))) ? 0 : 1;
Error += glm::all(glm::closeBounded(glm::ivec2(3), glm::ivec2(1), glm::ivec2(3))) ? 0 : 1;
return Error;
}
int main()
{
int Error = 0;
Error += test_isdenormal();
Error += ::fmod_::test();
Error += test_openBounded();
Error += test_closeBounded();
return Error;
}