Module: Moon::Easing::BounceInOut

Defined in:
lib/moon/packages/std/animation/easing.rb

Class Method Summary collapse

Class Method Details

.call(k) ⇒ Object


276
277
278
279
280
281
282
# File 'lib/moon/packages/std/animation/easing.rb', line 276

def self.call(k)
  if k < 0.5
    BounceIn.call(k * 2) * 0.5
  else
    BounceOut.call(k * 2 - 1) * 0.5 + 0.5
  end
end