Module: Tween::Cubic::InOut
- Defined in:
- lib/tween.rb
Class Method Summary collapse
Class Method Details
.ease(t, st, ch, d) ⇒ Object
182 183 184 185 186 187 188 |
# File 'lib/tween.rb', line 182 def self.ease(t, st, ch, d) if (t /= d / 2.0) < 1 ch / 2.0 * t * t * t + st else ch / 2.0 * ((t -= 2) * t * t + 2) + st end end |