Commit 9f9aaee6 authored by Ole Untzelmann's avatar Ole Untzelmann

[Animations] Sinus ease function added

parent 660b94c4
cmake @ f93d27f5
Subproject commit 15115c56e314569265d0ca4bba3fad1993c2777f
Subproject commit f93d27f5a7420ec6b3c1974eeb6e30bc9b97801d
......@@ -90,6 +90,21 @@ public:
}
};
class Sin : public EaseFunction
{
public:
Sin(float _frequency = 1.0f) :
mFrequency(_frequency) { }
virtual ~Sin(){}
virtual float value(const float _progress)
{
return sin(0.5f*M_PI*mFrequency*_progress);
}
float mFrequency;
};
class BlendLinear : public EaseFunction
{
public:
......
......@@ -78,7 +78,7 @@ public:
inline const T interpolate(const float _progress)
{
return mStartValue + _progress*mDiffValue;
return mStartValue + mDiffValue*_progress;
}
inline const T& finish()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment