Module: Tween::Sine::InOut

Defined in:
lib/tween.rb

Class Method Summary collapse

Class Method Details

.ease(t, st, ch, d) ⇒ Object



81
82
83
# File 'lib/tween.rb', line 81

def self.ease(t, st, ch, d)
  -ch / 2 * (Math.cos(Math::PI * t / d) - 1) + st
end