Update gtx_quaternion.cpp

This commit is contained in:
CaptainCarrot 2017-11-21 21:35:42 +01:00 committed by GitHub
parent b4e49055d5
commit 59f52e3bcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -105,7 +105,7 @@ int test_quat_lookAt()
glm::quat test_quat_LH = glm::quatLookAtLH(glm::normalize(center - eye), up); 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))); glm::quat test_mat_LH = glm::conjugate(glm::quat_cast(glm::lookAtLH(eye, center, up)));
Error += static_cast<int>(glm::abs(glm::length(test_quat_LH) - 1.0f) > glm::epsilon<float>()); Error += static_cast<int>(glm::abs(glm::length(test_quat_LH) - 1.0f) > glm::epsilon<float>());
Error += static_cast<int>(glm::min(glm::length(test_quat_LH - test_mat_LH), glm::length(test_quat_LH + test_mat_RH)) > glm::epsilon<float>()); Error += static_cast<int>(glm::min(glm::length(test_quat_LH - test_mat_LH), glm::length(test_quat_LH + test_mat_LH)) > glm::epsilon<float>());
// Test right-handed implementation // Test right-handed implementation
glm::quat test_quat_RH = glm::quatLookAtRH(glm::normalize(center - eye), up); glm::quat test_quat_RH = glm::quatLookAtRH(glm::normalize(center - eye), up);