Module: Moon::Easing::QuarticInOut

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

Class Method Summary collapse

Class Method Details

.call(k) ⇒ Object


67
68
69
70
71
72
73
# File 'lib/moon/packages/std/animation/easing.rb', line 67

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