simple_easing/quint.rs
1/// <https://easings.net/#easeInQuint>
2pub fn quint_in(t: f32) -> f32 {
3 t * t * t * t
4}
5
6/// <https://easings.net/#easeOutQuint>
7pub fn quint_out(t: f32) -> f32 {
8 1.0 - (1.0 - t).powi(5)
9}
10
11/// <https://easings.net/#easeInOutQuint>
12pub fn quint_in_out(t: f32) -> f32 {
13 if t < 0.5 {
14 16.0 * t * t * t * t * t
15 } else {
16 1.0 - (-2.0 * t + 2.0).powi(5) / 2.0
17 }
18}