diff --git a/glm/gtx/rotate_vector.inl b/glm/gtx/rotate_vector.inl index 0c6d5772..69eaa1fd 100644 --- a/glm/gtx/rotate_vector.inl +++ b/glm/gtx/rotate_vector.inl @@ -50,7 +50,7 @@ namespace rotate_vector T const & angle, detail::tvec3 const & normal) { - return glm::gtx::transform::::rotate(angle, normal) * v; + return glm::gtx::transform::rotate(angle, normal) * v; } template @@ -141,7 +141,7 @@ namespace rotate_vector detail::tvec3 RotationAxis = cross(Up, Normal); T Angle = degrees(acos(dot(Normal, Up))); - return rotate(Angle, RotationAxis); + return glm::gtx::transform::rotate(Angle, RotationAxis); } }//namespace rotate_vector diff --git a/glm/gtx/vector_angle.inl b/glm/gtx/vector_angle.inl index 481e7ad0..5e8a0066 100644 --- a/glm/gtx/vector_angle.inl +++ b/glm/gtx/vector_angle.inl @@ -55,22 +55,6 @@ GLM_FUNC_QUALIFIER valType orientedAngle return Angle; } -//! \todo epsilon is hard coded to 0.01 -template -GLM_FUNC_QUALIFIER valType orientedAngle -( - detail::tvec4 const & x, - detail::tvec4 const & y -) -{ - valType Angle = degrees(acos(dot(x, y))); - detail::tvec4 TransformedVector = glm::gtx::rotate_vector::rotate(y, Angle, glm::core::function::geometric::cross(x, y)); - if(all(equalEpsilon(x, TransformedVector, valType(0.01)))) - return -Angle; - else - return Angle; -} - template GLM_FUNC_QUALIFIER valType orientedAngleFromRef ( @@ -103,22 +87,6 @@ GLM_FUNC_QUALIFIER valType orientedAngleFromRef return glm::degrees(Angle); } -template -GLM_FUNC_QUALIFIER valType orientedAngleFromRef -( - detail::tvec4 const & x, - detail::tvec4 const & y, - detail::tvec3 const & ref -) -{ - valType Angle = glm::acos(glm::dot(x, y)); - - if(glm::dot(ref, glm::cross(detail::tvec3(x), detail::tvec3(y))) < valType(0)) - return -glm::degrees(Angle); - else - return glm::degrees(Angle); -} - }//namespace vector_angle }//namespace gtx }//namespace glm diff --git a/test/gtx/gtx_vector_angle.cpp b/test/gtx/gtx_vector_angle.cpp index 0b63af81..20b5bc96 100644 --- a/test/gtx/gtx_vector_angle.cpp +++ b/test/gtx/gtx_vector_angle.cpp @@ -38,11 +38,6 @@ int test_vector_angle_orientedAngle() float AngleD = glm::orientedAngle(glm::vec3(0, 1, 0), glm::normalize(glm::vec3(1, 1, 0))); Error += AngleD == -45.f ? 0 : 1; - float AngleE = glm::orientedAngle(glm::vec4(1, 0, 0, 0), glm::normalize(glm::vec4(1, 1, 0, 0))); - Error += AngleE == 45.f ? 0 : 1; - float AngleF = glm::orientedAngle(glm::vec4(0, 1, 0, 0), glm::normalize(glm::vec4(1, 1, 0, 0))); - Error += AngleF == -45.f ? 0 : 1; - return Error; }