From 84b740d36e5cede16e883b31888f4f4deced8297 Mon Sep 17 00:00:00 2001 From: Sebastien Lussier Date: Wed, 23 Oct 2013 00:22:19 -0400 Subject: [PATCH] Added missing precision template params int GTX compatibility --- glm/gtx/compatibility.hpp | 32 ++++++++++++++++---------------- glm/gtx/compatibility.inl | 26 +++++++++++++------------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/glm/gtx/compatibility.hpp b/glm/gtx/compatibility.hpp index 68dadccc..f1c2104c 100644 --- a/glm/gtx/compatibility.hpp +++ b/glm/gtx/compatibility.hpp @@ -62,29 +62,29 @@ namespace glm /// @{ template GLM_FUNC_QUALIFIER T lerp(T x, T y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER detail::tvec2 lerp(const detail::tvec2& x, const detail::tvec2& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER detail::tvec3 lerp(const detail::tvec3& x, const detail::tvec3& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER detail::tvec4 lerp(const detail::tvec4& x, const detail::tvec4& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER detail::tvec2 lerp(const detail::tvec2& x, const detail::tvec2& y, const detail::tvec2& 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 detail::tvec3 lerp(const detail::tvec3& x, const detail::tvec3& y, const detail::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 detail::tvec4 lerp(const detail::tvec4& x, const detail::tvec4& y, const detail::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 detail::tvec2 lerp(const detail::tvec2& x, const detail::tvec2& y, T a){return mix(x, y, a);} //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec3 lerp(const detail::tvec3& x, const detail::tvec3& y, T a) { return mix(x, y, a); } //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec4 lerp(const detail::tvec4& x, const detail::tvec4& y, T a) { return mix(x, y, a); } //!< \brief Returns x * (1.0 - a) + y * a, i.e., the linear blend of x and y using the floating-point value a. The value for a is not restricted to the range [0, 1]. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec2 lerp(const detail::tvec2& x, const detail::tvec2& y, const detail::tvec2& 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 detail::tvec3 lerp(const detail::tvec3& x, const detail::tvec3& y, const detail::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 detail::tvec4 lerp(const detail::tvec4& x, const detail::tvec4& y, const detail::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(detail::tquat const & x, detail::tquat const & y, T const & a){return mix(x, y, a);} //!< \brief Returns the slurp interpolation between two quaternions. + template GLM_FUNC_QUALIFIER T slerp(detail::tquat const & x, detail::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 detail::tvec2 saturate(const detail::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 detail::tvec3 saturate(const detail::tvec3& 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 detail::tvec4 saturate(const detail::tvec4& 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 detail::tvec2 saturate(const detail::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 detail::tvec3 saturate(const detail::tvec3& 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 detail::tvec4 saturate(const detail::tvec4& 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 T atan2(T x, T y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER detail::tvec2 atan2(const detail::tvec2& x, const detail::tvec2& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER detail::tvec3 atan2(const detail::tvec3& x, const detail::tvec3& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) - template GLM_FUNC_QUALIFIER detail::tvec4 atan2(const detail::tvec4& x, const detail::tvec4& y){return atan(x, y);} //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec2 atan2(const detail::tvec2& x, const detail::tvec2& y) { return atan(x, y); } //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec3 atan2(const detail::tvec3& x, const detail::tvec3& y) { return atan(x, y); } //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) + template GLM_FUNC_QUALIFIER detail::tvec4 atan2(const detail::tvec4& x, const detail::tvec4& y) { return atan(x, y); } //!< \brief Arc tangent. Returns an angle whose tangent is y/x. The signs of x and y are used to determine what quadrant the angle is in. The range of values returned by this function is [-PI, PI]. Results are undefined if x and y are both 0. (From GLM_GTX_compatibility) template bool isfinite(genType const & x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) - template detail::tvec2 isfinite(const detail::tvec2& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) - template detail::tvec3 isfinite(const detail::tvec3& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) - template detail::tvec4 isfinite(const detail::tvec4& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) + template detail::tvec2 isfinite(const detail::tvec2& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) + template detail::tvec3 isfinite(const detail::tvec3& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) + template detail::tvec4 isfinite(const detail::tvec4& x); //!< \brief Test whether or not a scalar or each vector component is a finite value. (From GLM_GTX_compatibility) typedef bool bool1; //!< \brief boolean type with 1 component. (From GLM_GTX_compatibility extension) typedef detail::tvec2 bool2; //!< \brief boolean type with 2 components. (From GLM_GTX_compatibility extension) diff --git a/glm/gtx/compatibility.inl b/glm/gtx/compatibility.inl index 073c6941..054bba88 100644 --- a/glm/gtx/compatibility.inl +++ b/glm/gtx/compatibility.inl @@ -10,7 +10,7 @@ namespace glm { // isfinite - template + template GLM_FUNC_QUALIFIER bool isfinite( genType const & x) { @@ -27,30 +27,30 @@ namespace glm # endif } - template - GLM_FUNC_QUALIFIER detail::tvec2 isfinite( - detail::tvec2 const & x) + template + GLM_FUNC_QUALIFIER detail::tvec2 isfinite( + detail::tvec2 const & x) { - return detail::tvec2( + return detail::tvec2( isfinite(x.x), isfinite(x.y)); } - template - GLM_FUNC_QUALIFIER detail::tvec3 isfinite( - detail::tvec3 const & x) + template + GLM_FUNC_QUALIFIER detail::tvec3 isfinite( + detail::tvec3 const & x) { - return detail::tvec3( + return detail::tvec3( isfinite(x.x), isfinite(x.y), isfinite(x.z)); } - template - GLM_FUNC_QUALIFIER detail::tvec4 isfinite( - detail::tvec4 const & x) + template + GLM_FUNC_QUALIFIER detail::tvec4 isfinite( + detail::tvec4 const & x) { - return detail::tvec4( + return detail::tvec4( isfinite(x.x), isfinite(x.y), isfinite(x.z),