stella v0.6.0 Easing
Documentation for Easing
.
Annotations
- t - current time (seconds or miliseconds)
- b - start value
- c - change in value
- d - duration (seconds or miliseconds)
Link to this section Summary
Functions
Cubic easing in - accelerating from zero velocity
Cubic easing in/out - acceleration until halfway, then deceleration
Quadratic easing in/out - acceleration until halfway, then deceleration
Quintic easing in/out - acceleration until halfway, then deceleration
Quadratic easing in - accelerating from zero velocity
Quartic easing in - accelerating from zero velocity
Cubic easing out - decelerating to zero velocity
Quadratic easing out - decelerating to zero velocity
Quartic easing out - decelerating to zero velocity
Simple linear tweening - no easing, no acceleration
Link to this section Functions
ease_in_cubic(t, b, c, d)
Specs
Cubic easing in - accelerating from zero velocity
Examples
iex> Easing.ease_in_cubic(1, 2, 3, 4)
2.046875
ease_in_out_cubic(t, b, c, d)
Specs
Cubic easing in/out - acceleration until halfway, then deceleration
Examples
iex> Easing.ease_in_out_cubic(1, 2, 3, 4)
2.1875
ease_in_out_quad(t, b, c, d)
Specs
Quadratic easing in/out - acceleration until halfway, then deceleration
Examples
iex> Easing.ease_in_out_quad(1, 2, 3, 4)
1.625
ease_in_out_quart(t, b, c, d)
Specs
Quintic easing in/out - acceleration until halfway, then deceleration
Examples
iex> Easing.ease_in_out_quart(1, 2, 3, 4)
2.046875
ease_in_quad(t, b, c, d)
Specs
Quadratic easing in - accelerating from zero velocity
Examples
iex> Easing.ease_in_quad(1, 2, 3, 4)
2.1875
ease_in_quart(t, b, c, d)
Specs
Quartic easing in - accelerating from zero velocity
Examples
iex> Easing.ease_in_quart(1, 2, 3, 4)
2.01171875
ease_out_cubic(t, b, c, d)
Specs
Cubic easing out - decelerating to zero velocity
Examples
iex> Easing.ease_out_cubic(1, 2, 3, 4)
3.734375
ease_out_quad(t, b, c, d)
Specs
Quadratic easing out - decelerating to zero velocity
Examples
iex> Easing.ease_out_quad(1, 2, 3, 4)
3.3125
ease_out_quart(t, b, c, d)
Specs
Quartic easing out - decelerating to zero velocity
Examples
iex> Easing.ease_out_quart(1, 2, 3, 4)
4.05078125
linear_tween(t, b, c, d)
Specs
Simple linear tweening - no easing, no acceleration
Examples
iex> Easing.linear_tween(1, 2, 3, 4)
2.75