diff --git a/glm/virtrev/xstream.hpp b/glm/virtrev/xstream.hpp index 1f19dae2..cf13ffbe 100644 --- a/glm/virtrev/xstream.hpp +++ b/glm/virtrev/xstream.hpp @@ -1,6 +1,3 @@ -#ifndef GLM_EXT_VIRTREV_XSTREAM_HPP -#define GLM_EXT_VIRTREV_XSTREAM_HPP - /////////////////////////////////////////////////////////////////////////////////////////////////// // OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net) // Virtrev SDK copyright matrem (matrem84.free.fr) @@ -15,6 +12,9 @@ // - GLM_GTX_matrix_selection /////////////////////////////////////////////////////////////////////////////////////////////////// +#ifndef GLM_EXT_VIRTREV_XSTREAM_HPP +#define GLM_EXT_VIRTREV_XSTREAM_HPP + #include "../glm.hpp" #include "../gtc/matrix_access.hpp" #include diff --git a/test/gtc/gtc_quaternion.cpp b/test/gtc/gtc_quaternion.cpp index a84b03be..d59fb1a3 100644 --- a/test/gtc/gtc_quaternion.cpp +++ b/test/gtc/gtc_quaternion.cpp @@ -29,67 +29,12 @@ int test_quat_type() return 0; } -int test_quat_slerp() -{ - int Error = 0; - - 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); - glm::quat D(glm::normalize(glm::vec3(0, 1, 1))); - - Error += C == D ? 0 : 1; - - return Error; -} - -int test_quat_length() -{ - int Error = 0; - - float A = glm::length(glm::quat(45.0f, glm::vec3(0, 0, 1))); - Error += A == 1.0f ? 0 : 1; - float B = glm::length(glm::quat(90.0f, glm::vec3(0, 0, 2))); - Error += B == 2.0f ? 0 : 1; - - return Error; -} - -int test_quat_normalize() -{ - int Error = 0; - - { - glm::quat Q(45.0f, glm::vec3(0, 0, 1)); - glm::quat N = glm::normalize(Q); - float L = glm::length(N); - Error += L == 1.0f ? 0 : 1; - } - { - glm::quat Q(45.0f, glm::vec3(0, 0, 2)); - glm::quat N = glm::normalize(Q); - float L = glm::length(N); - Error += L == 1.0f ? 0 : 1; - } - { - glm::quat Q(45.0f, glm::vec3(1, 2, 3)); - glm::quat N = glm::normalize(Q); - float L = glm::length(N); - Error += L == 1.0f ? 0 : 1; - } - - return Error; -} - int main() { int Error = 0; Error += test_quat_precision(); Error += test_quat_type(); - Error += test_quat_slerp(); - Error += test_quat_length(); - Error += test_quat_normalize(); return Error; }