Module: Moon::Easing::QuinticInOut

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

Class Method Summary collapse

Class Method Details

.call(k) ⇒ Object


89
90
91
92
93
94
95
# File 'lib/moon/packages/std/animation/easing.rb', line 89

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