Crates.io | easer |
lib.rs | easer |
version | 0.3.0 |
source | src |
created_at | 2016-04-26 17:57:05.818699 |
updated_at | 2022-08-30 06:10:35.376471 |
description | Tiny library imlementing Robert Penner's easing functions |
homepage | https://github.com/orhanbalci |
repository | https://github.com/orhanbalci/rust-easing.git |
max_upload_size | |
id | 4868 |
size | 32,256 |
Tiny Rust library implementing Robert Penner's easing functions.
Add this to your Cargo.toml
[dependencies]
easer = "0.2.1"
Add this to top of your code file
extern crate easer
use easer::functions::*;
let mut y: [f64; 100] = [0.0; 100];
for i in 0..100 {
y[i] = i as f64;
}
println!("Before {:?}", &y[..]);
y.iter_mut().map(|a| *a = Back::ease_in(*a, 0.0, 100.0, 100.0)).count();
println!("After {:?}", &y[..]);