Merge pull request #682 from CaptainCarrot/Quaternion-Look-At

quatLookAt: removed internal normalization of input direction #682
This commit is contained in:
Christophe
2017-09-20 14:03:30 +02:00
committed by GitHub
3 changed files with 7 additions and 7 deletions

View File

@@ -99,9 +99,9 @@ int test_quat_lookAt()
glm::vec3 eye(0.0f);
glm::vec3 center(1.1f, -2.0f, 3.1416f);
glm::vec3 up = glm::vec3(-0.17f, 7.23f, -1.744f);
glm::vec3 up(-0.17f, 7.23f, -1.744f);
glm::quat test_quat = glm::quatLookAt(center - eye, up);
glm::quat test_quat = glm::quatLookAt(glm::normalize(center - eye), up);
glm::quat test_mat = glm::conjugate(glm::quat_cast(glm::lookAt(eye, center, up)));
Error += static_cast<int>(glm::abs(glm::length(test_quat) - 1.0f) > glm::epsilon<float>());