feat: add #[must_use] to all functions

This commit is contained in:
2026-02-15 12:19:53 +01:00
parent 52f9d944e9
commit 2f956031a6
11 changed files with 33 additions and 0 deletions
+3
View File
@@ -4,18 +4,21 @@ const C3: f32 = C1 + 1.0;
/// <https://easings.net/#easeInBack>
#[inline]
#[must_use]
pub fn back_in(t: f32) -> f32 {
C3 * t * t * t - C1 * t * t
}
/// <https://easings.net/#easeOutBack>
#[inline]
#[must_use]
pub fn back_out(t: f32) -> f32 {
1.0 + C3 * (t - 1.0).powi(3) + C1 * (t - 1.0).powi(2)
}
/// <https://easings.net/#easeInOutBack>
#[inline]
#[must_use]
pub fn back_in_out(t: f32) -> f32 {
if t < 0.5 {
((2.0 * t).powi(2) * ((C2 + 1.0) * 2.0 * t - C2)) / 2.0