blob: 27fecae31da28bc7db83ba2f9f1e28f9e4c986b6 [file] [log] [blame]
#ifndef _RIVE_ELASTIC_EASE_HPP_
#define _RIVE_ELASTIC_EASE_HPP_
namespace rive
{
class ElasticEase
{
public:
ElasticEase(float amplitude, float period);
float easeOut(float factor) const;
float easeIn(float factor) const;
float easeInOut(float factor) const;
private:
float computeActualAmplitude(float time) const;
float m_amplitude;
float m_period;
// Computed phase shift for starting the sin function at 0 at factor 0.
float m_s;
};
} // namespace rive
#endif