From 3d526d13886414d966cb9c6bf4e60d7e3bb32c45 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Mon, 1 Oct 2018 17:24:54 +0200 Subject: [PATCH] Improved EXT_scalar_packing tests --- test/ext/ext_scalar_packing.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/ext/ext_scalar_packing.cpp b/test/ext/ext_scalar_packing.cpp index ef9cb3da..b96b10a6 100644 --- a/test/ext/ext_scalar_packing.cpp +++ b/test/ext/ext_scalar_packing.cpp @@ -1,7 +1,6 @@ #include #include #include -#include #include static int test_half() @@ -20,9 +19,13 @@ static int test_half() { glm::uint16 p0 = glm::packHalf(Tests[i]); float v0 = glm::unpackHalf(p0); + Error += glm::equal(v0, Tests[i], 0.01f) ? 0 : 1; + glm::uint16 p1 = glm::packHalf(v0); float v1 = glm::unpackHalf(p1); - Error += glm::equal(v0, v1, glm::epsilon()) ? 0 : 1; + Error += glm::equal(v1, Tests[i], 0.01f) ? 0 : 1; + + Error += glm::equal(v0, v1, 0) ? 0 : 1; } return Error;