mirror of
https://github.com/g-truc/glm.git
synced 2024-11-22 17:04:35 +00:00
Merge pull request #1134 from la-canne-enchainee/test_round_fix
Fix round test #1134
This commit is contained in:
commit
efec5db081
@ -639,7 +639,7 @@ namespace round_
|
||||
float A = glm::round(0.0f);
|
||||
Error += glm::equal(A, 0.0f, glm::epsilon<float>()) ? 0 : 1;
|
||||
float B = glm::round(0.5f);
|
||||
Error += glm::equal(B, 1.0f, glm::epsilon<float>()) ? 0 : 1;
|
||||
Error += (glm::equal(B, 1.0f, glm::epsilon<float>()) || glm::equal(B, 0.0f, glm::epsilon<float>())) ? 0 : 1;
|
||||
float C = glm::round(1.0f);
|
||||
Error += glm::equal(C, 1.0f, glm::epsilon<float>()) ? 0 : 1;
|
||||
float D = glm::round(0.1f);
|
||||
@ -656,7 +656,7 @@ namespace round_
|
||||
float A = glm::round(-0.0f);
|
||||
Error += glm::equal(A, 0.0f, glm::epsilon<float>()) ? 0 : 1;
|
||||
float B = glm::round(-0.5f);
|
||||
Error += glm::equal(B, -1.0f, glm::epsilon<float>()) ? 0 : 1;
|
||||
Error += (glm::equal(B, -1.0f, glm::epsilon<float>()) || glm::equal(B, 0.0f, glm::epsilon<float>())) ? 0 : 1;
|
||||
float C = glm::round(-1.0f);
|
||||
Error += glm::equal(C, -1.0f, glm::epsilon<float>()) ? 0 : 1;
|
||||
float D = glm::round(-0.1f);
|
||||
|
Loading…
Reference in New Issue
Block a user