diff --git a/glm/gtx/easing.hpp b/glm/gtx/easing.hpp index 83cbc4db..b0d20afc 100644 --- a/glm/gtx/easing.hpp +++ b/glm/gtx/easing.hpp @@ -171,29 +171,41 @@ namespace glm{ template GLM_FUNC_DECL genType elasticEaseInOut(genType const & a); - /// @param o Optional overshoot modifier /// @see gtx_easing template - GLM_FUNC_DECL genType backEaseIn(genType const & a, genType const & o = 1.70158f); + GLM_FUNC_DECL genType backEaseIn(genType const& a); + + /// @see gtx_easing + template + GLM_FUNC_DECL genType backEaseOut(genType const& a); + + /// @see gtx_easing + template + GLM_FUNC_DECL genType backEaseInOut(genType const& a); /// @param o Optional overshoot modifier /// @see gtx_easing template - GLM_FUNC_DECL genType backEaseOut(genType const & a, genType const & o = 1.70158f); + GLM_FUNC_DECL genType backEaseIn(genType const& a, genType const& o); /// @param o Optional overshoot modifier /// @see gtx_easing template - GLM_FUNC_DECL genType backEaseInOut(genType const & a, genType const & o = 1.70158f); + GLM_FUNC_DECL genType backEaseOut(genType const& a, genType const& o); + + /// @param o Optional overshoot modifier + /// @see gtx_easing + template + GLM_FUNC_DECL genType backEaseInOut(genType const& a, genType const& o); template - GLM_FUNC_DECL genType bounceEaseIn(genType const & a); + GLM_FUNC_DECL genType bounceEaseIn(genType const& a); template - GLM_FUNC_DECL genType bounceEaseOut(genType const & a); + GLM_FUNC_DECL genType bounceEaseOut(genType const& a); template - GLM_FUNC_DECL genType bounceEaseInOut(genType const & a, genType); + GLM_FUNC_DECL genType bounceEaseInOut(genType const& a, genType); /// @} }//namespace glm diff --git a/glm/gtx/easing.inl b/glm/gtx/easing.inl index 984e4a9e..4ea32c59 100644 --- a/glm/gtx/easing.inl +++ b/glm/gtx/easing.inl @@ -361,6 +361,24 @@ namespace glm{ } } + template + GLM_FUNC_QUALIFIER genType backEaseIn(genType const& a) + { + return backEaseIn(a, static_cast(1.70158)); + } + + template + GLM_FUNC_QUALIFIER genType backEaseOut(genType const& a) + { + return backEaseOut(a, static_cast(1.70158)); + } + + template + GLM_FUNC_QUALIFIER genType backEaseInOut(genType const& a) + { + return backEaseInOut(a, static_cast(1.70158)); + } + template GLM_FUNC_QUALIFIER genType bounceEaseOut(genType const& a) { diff --git a/test/gtx/gtx_easing.cpp b/test/gtx/gtx_easing.cpp index 90455811..79e6661a 100644 --- a/test/gtx/gtx_easing.cpp +++ b/test/gtx/gtx_easing.cpp @@ -13,39 +13,39 @@ namespace T r; r = glm::linearInterpolation(a); - // + r = glm::quadraticEaseIn(a); r = glm::quadraticEaseOut(a); r = glm::quadraticEaseInOut(a); - // + r = glm::cubicEaseIn(a); r = glm::cubicEaseOut(a); r = glm::cubicEaseInOut(a); - // + r = glm::quarticEaseIn(a); r = glm::quarticEaseOut(a); r = glm::quinticEaseInOut(a); - // + r = glm::sineEaseIn(a); r = glm::sineEaseOut(a); r = glm::sineEaseInOut(a); - // + r = glm::circularEaseIn(a); r = glm::circularEaseOut(a); r = glm::circularEaseInOut(a); - // + r = glm::exponentialEaseIn(a);; r = glm::exponentialEaseOut(a); r = glm::exponentialEaseInOut(a); - // + r = glm::elasticEaseIn(a); r = glm::elasticEaseOut(a); r = glm::elasticEaseInOut(a); - // + r = glm::backEaseIn(a); r = glm::backEaseOut(a); r = glm::backEaseInOut(a); - // + r = glm::bounceEaseIn(a);; r = glm::bounceEaseOut(a); r = glm::bounceEaseInOut(a);