Class: Metro::Easing::Linear

Inherits:
Metro::Easing show all
Defined in:
lib/metro/animation/easing/linear.rb

Overview

Perform a linear motion between the start position and the final position.

Class Method Summary collapse

Methods inherited from Metro::Easing

calculate, easing_for, easings, register

Class Method Details

.calculation(moment, start, change, interval) ⇒ Object



8
9
10
# File 'lib/metro/animation/easing/linear.rb', line 8

def self.calculation(moment,start,change,interval)
  change * moment / interval + start
end