mirror of
https://github.com/emilk/egui.git
synced 2026-08-30 13:20:05 -04:00
emath: Add quadratic_in_inverse
This commit is contained in:
@@ -26,6 +26,14 @@ pub fn quadratic_in(t: f32) -> f32 {
|
|||||||
t * t
|
t * t
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Inverse of `quadratic_in`.
|
||||||
|
///
|
||||||
|
/// This is not the same as `1.0 - quadratic_in(t)`.
|
||||||
|
#[inline]
|
||||||
|
pub fn quadratic_in_inverse(y: f32) -> f32 {
|
||||||
|
y.sqrt()
|
||||||
|
}
|
||||||
|
|
||||||
/// <https://easings.net/#easeOutQuad>
|
/// <https://easings.net/#easeOutQuad>
|
||||||
///
|
///
|
||||||
/// Same as `1.0 - quadratic_in(1.0 - t)`.
|
/// Same as `1.0 - quadratic_in(1.0 - t)`.
|
||||||
|
|||||||
Reference in New Issue
Block a user