Module: Tween::Circ::InOut
- Defined in:
- lib/tween.rb
Class Method Summary collapse
Class Method Details
.ease(t, st, ch, d) ⇒ Object
102 103 104 105 106 107 108 |
# File 'lib/tween.rb', line 102 def self.ease(t, st, ch, d) if (t /= d/2.0) < 1 return -ch / 2 * (Math.sqrt(1 - t*t) - 1) + st else return ch / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + st end end |