Add files via upload

This commit is contained in:
CaptainCarrot 2017-11-21 20:05:40 +01:00 committed by GitHub
parent 6912f621d5
commit 7ba519491e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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<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_RH)) > glm::epsilon<float>());
// 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<int>(glm::abs(glm::length(test_quat_RH) - 1.0f) > glm::epsilon<float>());
Error += static_cast<int>(glm::min(glm::length(test_quat_RH + (-test_mat_RH)), glm::length(test_quat_RH + test_mat_RH)) > glm::epsilon<float>());
Error += static_cast<int>(glm::min(glm::length(test_quat_RH - test_mat_RH), glm::length(test_quat_RH + test_mat_RH)) > glm::epsilon<float>());
return Error;
}