From 7ba519491e97eaf3853b3e31c05a3d5809a32d93 Mon Sep 17 00:00:00 2001 From: CaptainCarrot Date: Tue, 21 Nov 2017 20:05:40 +0100 Subject: [PATCH] Add files via upload --- test/gtx/gtx_quaternion.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/gtx/gtx_quaternion.cpp b/test/gtx/gtx_quaternion.cpp index 366263df..f0708151 100644 --- a/test/gtx/gtx_quaternion.cpp +++ b/test/gtx/gtx_quaternion.cpp @@ -105,13 +105,13 @@ int test_quat_lookAt() glm::quat test_quat_LH = glm::quatLookAtLH(glm::normalize(center - eye), up); glm::quat test_mat_LH = glm::conjugate(glm::quat_cast(glm::lookAtLH(eye, center, up))); Error += static_cast(glm::abs(glm::length(test_quat_LH) - 1.0f) > glm::epsilon()); - Error += static_cast(glm::min(glm::length(test_quat_LH + (-test_mat_LH)), glm::length(test_quat_LH + test_mat_RH)) > glm::epsilon()); + Error += static_cast(glm::min(glm::length(test_quat_LH - test_mat_LH), glm::length(test_quat_LH + test_mat_RH)) > glm::epsilon()); // Test right-handed implementation glm::quat test_quat_RH = glm::quatLookAtRH(glm::normalize(center - eye), up); glm::quat test_mat_RH = glm::conjugate(glm::quat_cast(glm::lookAtRH(eye, center, up))); Error += static_cast(glm::abs(glm::length(test_quat_RH) - 1.0f) > glm::epsilon()); - Error += static_cast(glm::min(glm::length(test_quat_RH + (-test_mat_RH)), glm::length(test_quat_RH + test_mat_RH)) > glm::epsilon()); + Error += static_cast(glm::min(glm::length(test_quat_RH - test_mat_RH), glm::length(test_quat_RH + test_mat_RH)) > glm::epsilon()); return Error; }