mirror of
https://github.com/g-truc/glm.git
synced 2024-11-22 17:04:35 +00:00
Added mix function tests
This commit is contained in:
parent
c3af426eb1
commit
b7f622a142
@ -216,11 +216,11 @@ namespace test_mix
|
||||
|
||||
// vec2 with bool
|
||||
{
|
||||
for(std::size_t i = 0; i < sizeof(TestBVec2) / sizeof(test<glm::vec2, bool>); ++i)
|
||||
for(std::size_t i = 0; i < sizeof(TestVec2Bool) / sizeof(test<glm::vec2, bool>); ++i)
|
||||
{
|
||||
glm::vec2 Result = glm::mix(TestBVec2[i].x, TestBVec2[i].y, TestBVec2[i].a);
|
||||
Error += glm::epsilonEqual(Result.x, TestBVec2[i].Result.x, glm::epsilon<float>()) ? 0 : 1;
|
||||
Error += glm::epsilonEqual(Result.y, TestBVec2[i].Result.y, glm::epsilon<float>()) ? 0 : 1;
|
||||
glm::vec2 Result = glm::mix(TestVec2Bool[i].x, TestVec2Bool[i].y, TestVec2Bool[i].a);
|
||||
Error += glm::epsilonEqual(Result.x, TestVec2Bool[i].Result.x, glm::epsilon<float>()) ? 0 : 1;
|
||||
Error += glm::epsilonEqual(Result.y, TestVec2Bool[i].Result.y, glm::epsilon<float>()) ? 0 : 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user