#easing #transition #interpolation #bounce #net #0-0

simple-easing

Set of simple easing functions

3 stable releases

Uses new Rust 2024

1.0.2 Feb 15, 2026
1.0.1 Jan 12, 2023
1.0.0 Aug 20, 2021

#340 in Algorithms

Download history 10600/week @ 2025-12-20 4420/week @ 2025-12-27 25251/week @ 2026-01-03 22250/week @ 2026-01-10 24626/week @ 2026-01-17 27089/week @ 2026-01-24 25967/week @ 2026-01-31 26760/week @ 2026-02-07 16175/week @ 2026-02-14 18945/week @ 2026-02-21 21027/week @ 2026-02-28 21081/week @ 2026-03-07 20002/week @ 2026-03-14 24497/week @ 2026-03-21 24116/week @ 2026-03-28 19954/week @ 2026-04-04

92,432 downloads per month
Used in 48 crates (6 directly)

MIT/Apache

10KB
279 lines

simple-easing

This package contains a set of simple easing functions.


lib.rs:

This package contains a set of simple easing functions. That consume a standardised time attribute in the range between 0.0 and 1.0, that represent the progress of a transition. 0.0 being the beginning, 1.0 the end.

They return a value between 0.0 and 1.0 (it might exceed the 0..=1 range temporarily for a bounce effect). The returned value can be used to interpolate between the initial (0.0) and the final (1.0) transition state, allowing for a "more natural" feel of a transition by accelerating and decelerating at certain points, depending on the easing function used.

Visit easings.net to see visualisations of the different easing functions.

All easing functions have the same signature ((f32) -> f32) and can be easily stored as fn pointers.

use ::simple_easing::linear;
let easing: fn(f32) -> f32 = linear;
assert_eq!(easing(1.0), 1.0);

No runtime deps