diff --git a/glm/gtc/quaternion.hpp b/glm/gtc/quaternion.hpp index 0230bacf3..e73e53480 100644 --- a/glm/gtc/quaternion.hpp +++ b/glm/gtc/quaternion.hpp @@ -198,7 +198,7 @@ namespace glm /// @see gtc_quaternion /// @see - slerp(tquat const & x, tquat const & y, T const & a) template - GLM_FUNC_DECL tquat mix(tquat const & x, tquat const & y, T const & a); + GLM_FUNC_DECL tquat mix(tquat const & x, tquat const & y, T a); /// Linear interpolation of two quaternions. /// The interpolation is oriented. @@ -209,7 +209,7 @@ namespace glm /// @tparam T Value type used to build the quaternion. Supported: half, float or double. /// @see gtc_quaternion template - GLM_FUNC_DECL tquat lerp(tquat const & x, tquat const & y, T const & a); + GLM_FUNC_DECL tquat lerp(tquat const & x, tquat const & y, T a); /// Spherical linear interpolation of two quaternions. /// The interpolation always take the short path and the rotation is performed at constant speed. @@ -220,7 +220,7 @@ namespace glm /// @tparam T Value type used to build the quaternion. Supported: half, float or double. /// @see gtc_quaternion template - GLM_FUNC_DECL tquat slerp(tquat const & x, tquat const & y, T const & a); + GLM_FUNC_DECL tquat slerp(tquat const & x, tquat const & y, T a); /// Returns the q conjugate. /// diff --git a/glm/gtc/quaternion.inl b/glm/gtc/quaternion.inl index 3eb598ced..336be2944 100644 --- a/glm/gtc/quaternion.inl +++ b/glm/gtc/quaternion.inl @@ -451,7 +451,7 @@ namespace detail */ template - GLM_FUNC_QUALIFIER tquat mix(tquat const & x, tquat const & y, T const & a) + GLM_FUNC_QUALIFIER tquat mix(tquat const & x, tquat const & y, T a) { T cosTheta = dot(x, y); @@ -474,7 +474,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tquat lerp(tquat const & x, tquat const & y, T const & a) + GLM_FUNC_QUALIFIER tquat lerp(tquat const & x, tquat const & y, T a) { // Lerp is only defined in [0, 1] assert(a >= static_cast(0)); @@ -484,7 +484,7 @@ namespace detail } template - GLM_FUNC_QUALIFIER tquat slerp(tquat const & x, tquat const & y, T const & a) + GLM_FUNC_QUALIFIER tquat slerp(tquat const & x, tquat const & y, T a) { tquat z = y; diff --git a/glm/gtx/compatibility.hpp b/glm/gtx/compatibility.hpp index 635ee9129..50b54a0ed 100644 --- a/glm/gtx/compatibility.hpp +++ b/glm/gtx/compatibility.hpp @@ -73,8 +73,6 @@ namespace glm template GLM_FUNC_QUALIFIER tvec3 lerp(const tvec3& x, const tvec3& y, const tvec3& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) template GLM_FUNC_QUALIFIER tvec4 lerp(const tvec4& x, const tvec4& y, const tvec4& a){return mix(x, y, a);} //!< \brief Returns the component-wise result of x * (1.0 - a) + y * a, i.e., the linear blend of x and y using vector a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER T slerp(tquat const & x, tquat const & y, T const & a){return mix(x, y, a);} //!< \brief Returns the slurp interpolation between two quaternions. - template GLM_FUNC_QUALIFIER T saturate(T x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) template GLM_FUNC_QUALIFIER tvec2 saturate(const tvec2& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) template GLM_FUNC_QUALIFIER tvec3 saturate(const tvec3& x){return clamp(x, T(0), T(1));} //!< \brief Returns clamp(x, 0, 1) for each component in x. (From GLM_GTX_compatibility) diff --git a/readme.txt b/readme.txt index dab2aff0e..f45356ccf 100644 --- a/readme.txt +++ b/readme.txt @@ -82,6 +82,7 @@ Fixes: - Fixed Visual C++ 32 bit build #283 - Fixed GLM_FORCE_SIZE_FUNC pragma message - Fixed C++98 only build +- Fixed conflict between GTX_compatibility and GTC_quaternion #286 ================================================================================ GLM 0.9.6.0: 2014-11-30