Fixed angle implementation

This commit is contained in:
Christophe Riccio
2011-05-27 16:34:20 +01:00
parent e4a52432ff
commit c9b7b712fb
3 changed files with 30 additions and 11 deletions

View File

@@ -23,11 +23,12 @@ int test_quat_slerp()
{
int Error = 0;
glm::quat A(0.0f, glm::vec3(0, 0, 1));
glm::quat B(90.0f, glm::vec3(0, 0, 1));
glm::quat A(glm::vec3(0, 0, 1));
glm::quat B(glm::vec3(0, 1, 0));
glm::quat C = glm::mix(A, B, 0.5f);
Error += C == glm::quat(45.f, glm::vec3(0, 0, 1)) ? 0 : 1;
glm::quat D(glm::normalize(glm::vec3(0, 1, 1)));
Error += C == D ? 0 : 1;
return Error;
}