Module: Tween::Quart::InOut

Defined in:
lib/tween.rb

Class Method Summary collapse

Class Method Details

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



266
267
268
269
270
271
272
# File 'lib/tween.rb', line 266

def self.ease(t, st, ch, d)
  if (t /= d / 2.0) < 1
    ch / 2.0 * t * t * t * t + st
  else
    -ch / 2.0 * ((t -= 2) * t * t * t - 2) + st
  end
end