From 2ca5985b0ecbf65afebc3b6b0852b4a5a20b02de Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Tue, 26 Apr 2011 12:08:30 +0100 Subject: [PATCH] Added ULP test file --- glm/gtx/ulp.inl | 30 +++++++++++++++--------------- test/gtx/CMakeLists.txt | 1 + test/gtx/gtx-ulp.cpp | 0 3 files changed, 16 insertions(+), 15 deletions(-) create mode 100644 test/gtx/gtx-ulp.cpp diff --git a/glm/gtx/ulp.inl b/glm/gtx/ulp.inl index 931c33c4..f5cb0d8d 100644 --- a/glm/gtx/ulp.inl +++ b/glm/gtx/ulp.inl @@ -53,39 +53,39 @@ namespace ulp return Count; } - template - inline detail::xvec2 ulp + template + inline detail::xvec2 ulp ( - detail::xvec2 const & a, - detail::xvec2 const & b + detail::xvec2 const & a, + detail::xvec2 const & b ) { - return detail::xvec2( + return detail::xvec2( ulp(a[0], b[0]), ulp(a[1], b[1])); } - template - inline detail::xvec3 ulp + template + inline detail::xvec3 ulp ( - detail::xvec3 const & a, - detail::xvec3 const & b + detail::xvec3 const & a, + detail::xvec3 const & b ) { - return detail::xvec2( + return detail::xvec3( ulp(a[0], b[0]), ulp(a[1], b[1]), ulp(a[2], b[2])); } - template - inline detail::xvec4 ulp + template + inline detail::xvec4 ulp ( - detail::xvec4 const & a, - detail::xvec4 const & b + detail::xvec4 const & a, + detail::xvec4 const & b ) { - return detail::xvec2( + return detail::xvec4( ulp(a[0], b[0]), ulp(a[1], b[1]), ulp(a[2], b[2]), diff --git a/test/gtx/CMakeLists.txt b/test/gtx/CMakeLists.txt index a10131e5..218e333a 100644 --- a/test/gtx/CMakeLists.txt +++ b/test/gtx/CMakeLists.txt @@ -1,3 +1,4 @@ glmCreateTestGTC(gtx-bit) glmCreateTestGTC(gtx-simd-vec4) glmCreateTestGTC(gtx-simd-mat4) +glmCreateTestGTC(gtx-ulp) diff --git a/test/gtx/gtx-ulp.cpp b/test/gtx/gtx-ulp.cpp new file mode 100644 index 00000000..e69de29b