#f32 #interpolation #easing #f64 #timing

easey

Easing functions for interpolation between 0.0 and 1.0

7 stable releases

2.1.0 Mar 14, 2022
2.0.0 Dec 21, 2021
1.2.0 Sep 5, 2021
1.1.2 Sep 5, 2021
1.0.0 Sep 5, 2021

#1679 in Algorithms

Download history 4/week @ 2024-02-19 4/week @ 2024-02-26 119/week @ 2024-04-01

119 downloads per month

MIT license

19KB
469 lines

Easey

Timing functions for animation in Rust.


lib.rs:

Easey is for interpolation and easing for numbers between 0.0 and 1.0.

It can be used as either stand alone functions, or a trait that adds these functions onto f32 and f64 types.

  use ::easey::f32::ease_in;
  let n : f32 = ease_in(0.3);
  use ::easey::Easey;
  let n : f32 = 0.3.ease_in();

The trait allows you to then easily chain functions, allowing one to combine them. For example ...

  use ::easey::Easey;
  let n : f32 = 0.3.pre_delay(0.2).ease_in();

No runtime deps