Fixed MinGW roundEven bug

This commit is contained in:
Christophe Riccio
2011-12-05 18:08:43 +00:00
parent dad27d9b37
commit dd244d8d25
4 changed files with 86 additions and 9 deletions

View File

@@ -19,7 +19,7 @@ int test_floor_log2()
for(std::size_t i = 1; i < 1000000; ++i)
{
glm::uint A = glm::floor_log2(glm::uint(i));
glm::uint B = glm::uint(glm::log2(double(i))); // Will fail with float, lack of accuracy
glm::uint B = glm::uint(glm::floor(glm::log2(double(i)))); // Will fail with float, lack of accuracy
Error += A == B ? 0 : 1;
assert(!Error);