feat: make all functions inlinable
This commit is contained in:
@@ -4,6 +4,7 @@ const C4: f32 = (2.0 * PI) / 3.0;
|
||||
const C5: f32 = (2.0 * PI) / 4.5;
|
||||
|
||||
/// <https://easings.net/#easeInElastic>
|
||||
#[inline]
|
||||
pub fn elastic_in(t: f32) -> f32 {
|
||||
if t <= 0.0 {
|
||||
0.0
|
||||
@@ -15,6 +16,7 @@ pub fn elastic_in(t: f32) -> f32 {
|
||||
}
|
||||
|
||||
/// <https://easings.net/#easeOutElastic>
|
||||
#[inline]
|
||||
pub fn elastic_out(t: f32) -> f32 {
|
||||
if t <= 0.0 {
|
||||
0.0
|
||||
@@ -26,6 +28,7 @@ pub fn elastic_out(t: f32) -> f32 {
|
||||
}
|
||||
|
||||
/// <https://easings.net/#easeInOutElastic>
|
||||
#[inline]
|
||||
pub fn elastic_in_out(t: f32) -> f32 {
|
||||
if t <= 0.0 {
|
||||
0.0
|
||||
|
||||
Reference in New Issue
Block a user