easing.c file
Functions
-
auto vm_elastic_oscillation(const vm_
float_ t f, const vm_ float_ t exp_mult, const vm_ float_ t sin_mult, const vm_ float_ t sin_offset, const vm_ float_ t period) -> vm_ float_ t - Damped sine used by the elastic easing curves.
-
auto vm_poly_ease_in(const vm_
float_ t f, const vm_ float_ t n) -> vm_ float_ t - Polynomial ease-in:
f^n. -
auto vm_poly_ease_out(const vm_
float_ t f, const vm_ float_ t n) -> vm_ float_ t - Polynomial ease-out:
1 - (1-f)^n. -
auto vm_poly_ease_in_out(const vm_
float_ t f, const vm_ float_ t n) -> vm_ float_ t - Polynomial ease-in-out of degree
n. -
auto vm_quadratic_ease_out(const vm_
float_ t f) -> vm_ float_ t - Quadratic ease-out.
-
auto vm_quadratic_ease_in(const vm_
float_ t f) -> vm_ float_ t - Quadratic ease-in.
-
auto vm_quadratic_ease_in_out(const vm_
float_ t f) -> vm_ float_ t - Quadratic ease-in-out.
-
auto vm_cubic_ease_out(const vm_
float_ t f) -> vm_ float_ t - Cubic ease-out.
-
auto vm_cubic_ease_in(const vm_
float_ t f) -> vm_ float_ t - Cubic ease-in.
-
auto vm_cubic_ease_in_out(const vm_
float_ t f) -> vm_ float_ t - Cubic ease-in-out.
-
auto vm_quartic_ease_out(const vm_
float_ t f) -> vm_ float_ t - Quartic ease-out.
-
auto vm_quartic_ease_in(const vm_
float_ t f) -> vm_ float_ t - Quartic ease-in.
-
auto vm_quartic_ease_in_out(const vm_
float_ t f) -> vm_ float_ t - Quartic ease-in-out.
-
auto vm_quintic_ease_out(const vm_
float_ t f) -> vm_ float_ t - Quintic ease-out.
-
auto vm_quintic_ease_in(const vm_
float_ t f) -> vm_ float_ t - Quintic ease-in.
-
auto vm_quintic_ease_in_out(const vm_
float_ t f) -> vm_ float_ t - Quintic ease-in-out.
-
auto vm_sine_ease_out(const vm_
float_ t f) -> vm_ float_ t - Sinusoidal ease-out.
-
auto vm_sine_ease_in(const vm_
float_ t f) -> vm_ float_ t - Sinusoidal ease-in.
-
auto vm_sine_ease_in_out(const vm_
float_ t f) -> vm_ float_ t - Sinusoidal ease-in-out.
-
auto vm_circular_ease_out(const vm_
float_ t f) -> vm_ float_ t - Circular ease-out.
-
auto vm_circular_ease_in(const vm_
float_ t f) -> vm_ float_ t - Circular ease-in.
-
auto vm_circular_ease_in_out(const vm_
float_ t f) -> vm_ float_ t - Circular ease-in-out.
-
auto vm_exponential_ease_out(const vm_
float_ t f) -> vm_ float_ t - Exponential ease-out.
-
auto vm_exponential_ease_in(const vm_
float_ t f) -> vm_ float_ t - Exponential ease-in.
-
auto vm_exponential_ease_in_out(const vm_
float_ t f) -> vm_ float_ t - Exponential ease-in-out.
-
auto vm_elastic_ease_out(const vm_
float_ t f) -> vm_ float_ t - Elastic ease-out.
-
auto vm_elastic_ease_in(const vm_
float_ t f) -> vm_ float_ t - Elastic ease-in.
-
auto vm_elastic_ease_in_out(const vm_
float_ t f) -> vm_ float_ t - Elastic ease-in-out.
-
auto vm_back_ease_out(const vm_
float_ t f) -> vm_ float_ t - Overshooting "back" ease-out.
-
auto vm_back_ease_in(const vm_
float_ t f) -> vm_ float_ t - Overshooting "back" ease-in.
-
auto vm_back_ease_in_out(const vm_
float_ t f) -> vm_ float_ t - Overshooting "back" ease-in-out.
-
auto vm_bounce_ease_out(const vm_
float_ t f) -> vm_ float_ t - Bounce ease-out.
-
auto vm_bounce_ease_in(const vm_
float_ t f) -> vm_ float_ t - Bounce ease-in.
-
auto vm_bounce_ease_in_out(const vm_
float_ t f) -> vm_ float_ t - Bounce ease-in-out.
-
auto vm_smoothstep(const vm_
float_ t edge0, const vm_ float_ t edge1, const vm_ float_ t x) -> vm_ float_ t - Smooth Hermite interpolation (cubic).
-
auto vm_smootherstep(const vm_
float_ t edge0, const vm_ float_ t edge1, const vm_ float_ t x) -> vm_ float_ t - Smoother Hermite interpolation (quintic).
-
auto elastic_oscillation(const vm_
float_ t f, const vm_ float_ t exp_mult, const vm_ float_ t sin_mult, const vm_ float_ t sin_offset, const vm_ float_ t period) -> vm_ float_ t -
auto poly_ease_in(const vm_
float_ t f, const vm_ float_ t n) -> vm_ float_ t -
auto poly_ease_out(const vm_
float_ t f, const vm_ float_ t n) -> vm_ float_ t -
auto poly_ease_in_out(const vm_
float_ t f, const vm_ float_ t n) -> vm_ float_ t -
auto quadratic_ease_out(const vm_
float_ t f) -> vm_ float_ t -
auto quadratic_ease_in(const vm_
float_ t f) -> vm_ float_ t -
auto quadratic_ease_in_out(const vm_
float_ t f) -> vm_ float_ t -
auto cubic_ease_out(const vm_
float_ t f) -> vm_ float_ t -
auto cubic_ease_in(const vm_
float_ t f) -> vm_ float_ t -
auto cubic_ease_in_out(const vm_
float_ t f) -> vm_ float_ t -
auto quartic_ease_out(const vm_
float_ t f) -> vm_ float_ t -
auto quartic_ease_in(const vm_
float_ t f) -> vm_ float_ t -
auto quartic_ease_in_out(const vm_
float_ t f) -> vm_ float_ t -
auto quintic_ease_out(const vm_
float_ t f) -> vm_ float_ t -
auto quintic_ease_in(const vm_
float_ t f) -> vm_ float_ t -
auto quintic_ease_in_out(const vm_
float_ t f) -> vm_ float_ t -
auto sine_ease_out(const vm_
float_ t f) -> vm_ float_ t -
auto sine_ease_in(const vm_
float_ t f) -> vm_ float_ t -
auto sine_ease_in_out(const vm_
float_ t f) -> vm_ float_ t -
auto circular_ease_out(const vm_
float_ t f) -> vm_ float_ t -
auto circular_ease_in(const vm_
float_ t f) -> vm_ float_ t -
auto circular_ease_in_out(const vm_
float_ t f) -> vm_ float_ t -
auto exponential_ease_out(const vm_
float_ t f) -> vm_ float_ t -
auto exponential_ease_in(const vm_
float_ t f) -> vm_ float_ t -
auto exponential_ease_in_out(const vm_
float_ t f) -> vm_ float_ t -
auto elastic_ease_out(const vm_
float_ t f) -> vm_ float_ t -
auto elastic_ease_in(const vm_
float_ t f) -> vm_ float_ t -
auto elastic_ease_in_out(const vm_
float_ t f) -> vm_ float_ t -
auto back_ease_out(const vm_
float_ t f) -> vm_ float_ t -
auto back_ease_in(const vm_
float_ t f) -> vm_ float_ t -
auto back_ease_in_out(const vm_
float_ t f) -> vm_ float_ t -
auto bounce_ease_out(const vm_
float_ t f) -> vm_ float_ t -
auto bounce_ease_in(const vm_
float_ t f) -> vm_ float_ t -
auto bounce_ease_in_out(const vm_
float_ t f) -> vm_ float_ t -
auto smoothstep(const vm_
float_ t edge0, const vm_ float_ t edge1, const vm_ float_ t x) -> vm_ float_ t -
auto smootherstep(const vm_
float_ t edge0, const vm_ float_ t edge1, const vm_ float_ t x) -> vm_ float_ t
Function documentation
vm_ float_ t vm_elastic_oscillation(const vm_ float_ t f,
const vm_ float_ t exp_mult,
const vm_ float_ t sin_mult,
const vm_ float_ t sin_offset,
const vm_ float_ t period)
Damped sine used by the elastic easing curves.
| Parameters | |
|---|---|
| f | Normalized time in [0, 1]. |
| exp_mult | |
| sin_mult | |
| sin_offset | |
| period | |
| Returns | Combined exponential-sine value. |
vm_ float_ t vm_poly_ease_in(const vm_ float_ t f,
const vm_ float_ t n)
Polynomial ease-in: f^n.
| Parameters | |
|---|---|
| f | Normalized time in [0, 1]. |
| n | |
| Returns | Eased value. |
vm_ float_ t vm_poly_ease_out(const vm_ float_ t f,
const vm_ float_ t n)
Polynomial ease-out: 1 - (1-f)^n.
| Parameters | |
|---|---|
| f | Normalized time in [0, 1]. |
| n | |
| Returns | Eased value. |
vm_ float_ t vm_poly_ease_in_out(const vm_ float_ t f,
const vm_ float_ t n)
Polynomial ease-in-out of degree n.
| Parameters | |
|---|---|
| f | Normalized time in [0, 1]. |
| n | |
| Returns | Eased value. |
vm_ float_ t vm_quadratic_ease_out(const vm_ float_ t f)
Quadratic ease-out.
| Parameters | |
|---|---|
| f | Normalized time in [0, 1]. |
| Returns | Eased value. |
vm_ float_ t vm_quadratic_ease_in(const vm_ float_ t f)
Quadratic ease-in.
| Parameters | |
|---|---|
| f | Normalized time in [0, 1]. |
| Returns | Eased value. |
vm_ float_ t vm_quadratic_ease_in_out(const vm_ float_ t f)
Quadratic ease-in-out.
| Parameters | |
|---|---|
| f | Normalized time in [0, 1]. |
| Returns | Eased value. |
vm_ float_ t vm_cubic_ease_out(const vm_ float_ t f)
Cubic ease-out.
| Parameters | |
|---|---|
| f | Normalized time in [0, 1]. |
| Returns | Eased value. |
vm_ float_ t vm_cubic_ease_in(const vm_ float_ t f)
Cubic ease-in.
| Parameters | |
|---|---|
| f | Normalized time in [0, 1]. |
| Returns | Eased value. |
vm_ float_ t vm_cubic_ease_in_out(const vm_ float_ t f)
Cubic ease-in-out.
| Parameters | |
|---|---|
| f | Normalized time in [0, 1]. |
| Returns | Eased value. |
vm_ float_ t vm_quartic_ease_out(const vm_ float_ t f)
Quartic ease-out.
| Parameters | |
|---|---|
| f | Normalized time in [0, 1]. |
| Returns | Eased value. |
vm_ float_ t vm_quartic_ease_in(const vm_ float_ t f)
Quartic ease-in.
| Parameters | |
|---|---|
| f | Normalized time in [0, 1]. |
| Returns | Eased value. |
vm_ float_ t vm_quartic_ease_in_out(const vm_ float_ t f)
Quartic ease-in-out.
| Parameters | |
|---|---|
| f | Normalized time in [0, 1]. |
| Returns | Eased value. |
vm_ float_ t vm_quintic_ease_out(const vm_ float_ t f)
Quintic ease-out.
| Parameters | |
|---|---|
| f | Normalized time in [0, 1]. |
| Returns | Eased value. |
vm_ float_ t vm_quintic_ease_in(const vm_ float_ t f)
Quintic ease-in.
| Parameters | |
|---|---|
| f | Normalized time in [0, 1]. |
| Returns | Eased value. |
vm_ float_ t vm_quintic_ease_in_out(const vm_ float_ t f)
Quintic ease-in-out.
| Parameters | |
|---|---|
| f | Normalized time in [0, 1]. |
| Returns | Eased value. |
vm_ float_ t vm_sine_ease_out(const vm_ float_ t f)
Sinusoidal ease-out.
| Parameters | |
|---|---|
| f | Normalized time in [0, 1]. |
| Returns | Eased value. |
vm_ float_ t vm_sine_ease_in(const vm_ float_ t f)
Sinusoidal ease-in.
| Parameters | |
|---|---|
| f | Normalized time in [0, 1]. |
| Returns | Eased value. |
vm_ float_ t vm_sine_ease_in_out(const vm_ float_ t f)
Sinusoidal ease-in-out.
| Parameters | |
|---|---|
| f | Normalized time in [0, 1]. |
| Returns | Eased value. |
vm_ float_ t vm_circular_ease_out(const vm_ float_ t f)
Circular ease-out.
| Parameters | |
|---|---|
| f | Normalized time in [0, 1]. |
| Returns | Eased value. |
vm_ float_ t vm_circular_ease_in(const vm_ float_ t f)
Circular ease-in.
| Parameters | |
|---|---|
| f | Normalized time in [0, 1]. |
| Returns | Eased value. |
vm_ float_ t vm_circular_ease_in_out(const vm_ float_ t f)
Circular ease-in-out.
| Parameters | |
|---|---|
| f | Normalized time in [0, 1]. |
| Returns | Eased value. |
vm_ float_ t vm_exponential_ease_out(const vm_ float_ t f)
Exponential ease-out.
| Parameters | |
|---|---|
| f | Normalized time in [0, 1]. |
| Returns | Eased value. |
vm_ float_ t vm_exponential_ease_in(const vm_ float_ t f)
Exponential ease-in.
| Parameters | |
|---|---|
| f | Normalized time in [0, 1]. |
| Returns | Eased value. |
vm_ float_ t vm_exponential_ease_in_out(const vm_ float_ t f)
Exponential ease-in-out.
| Parameters | |
|---|---|
| f | Normalized time in [0, 1]. |
| Returns | Eased value. |
vm_ float_ t vm_elastic_ease_out(const vm_ float_ t f)
Elastic ease-out.
| Parameters | |
|---|---|
| f | Normalized time in [0, 1]. |
| Returns | Eased value. |
vm_ float_ t vm_elastic_ease_in(const vm_ float_ t f)
Elastic ease-in.
| Parameters | |
|---|---|
| f | Normalized time in [0, 1]. |
| Returns | Eased value. |
vm_ float_ t vm_elastic_ease_in_out(const vm_ float_ t f)
Elastic ease-in-out.
| Parameters | |
|---|---|
| f | Normalized time in [0, 1]. |
| Returns | Eased value. |
vm_ float_ t vm_back_ease_out(const vm_ float_ t f)
Overshooting "back" ease-out.
| Parameters | |
|---|---|
| f | Normalized time in [0, 1]. |
| Returns | Eased value. |
vm_ float_ t vm_back_ease_in(const vm_ float_ t f)
Overshooting "back" ease-in.
| Parameters | |
|---|---|
| f | Normalized time in [0, 1]. |
| Returns | Eased value. |
vm_ float_ t vm_back_ease_in_out(const vm_ float_ t f)
Overshooting "back" ease-in-out.
| Parameters | |
|---|---|
| f | Normalized time in [0, 1]. |
| Returns | Eased value. |
vm_ float_ t vm_bounce_ease_out(const vm_ float_ t f)
Bounce ease-out.
| Parameters | |
|---|---|
| f | Normalized time in [0, 1]. |
| Returns | Eased value. |
vm_ float_ t vm_bounce_ease_in(const vm_ float_ t f)
Bounce ease-in.
| Parameters | |
|---|---|
| f | Normalized time in [0, 1]. |
| Returns | Eased value. |
vm_ float_ t vm_bounce_ease_in_out(const vm_ float_ t f)
Bounce ease-in-out.
| Parameters | |
|---|---|
| f | Normalized time in [0, 1]. |
| Returns | Eased value. |
vm_ float_ t vm_smoothstep(const vm_ float_ t edge0,
const vm_ float_ t edge1,
const vm_ float_ t x)
Smooth Hermite interpolation (cubic).
Returns 0 when x <= edge0, 1 when x >= edge1, and the cubic Hermite polynomial 3t^2 - 2t^3 in between. First derivative is zero at both edges.
vm_ float_ t vm_smootherstep(const vm_ float_ t edge0,
const vm_ float_ t edge1,
const vm_ float_ t x)
Smoother Hermite interpolation (quintic).
Returns 0 when x <= edge0, 1 when x >= edge1, and the quintic Hermite polynomial 6t^5 - 15t^4 + 10t^3 in between. First and second derivatives are zero at both edges.