Crates.io | torcurve-rs |
lib.rs | torcurve-rs |
version | 0.1.3 |
source | src |
created_at | 2022-02-13 19:20:41.581085 |
updated_at | 2022-02-13 20:55:11.508747 |
description | parameterized curve formula for generating lots of different curve shapes useful for easing, etc. based on a torcado tweet |
homepage | https://github.com/akarras/torcurve-rs/ |
repository | |
max_upload_size | |
id | 531856 |
size | 6,647 |
A reusable implementation of toracdo's generalized, parameterized curve formula for generating lots of different curve shapes useful for easing, etc.
Zero dependencies, and exposes a single function.
Note, I'm not the original creator of the formula. I just wanted a Rust implementation and figured I should share.
Add torcurve-rs = 0.1
to your dependencies
use torcurve_rs::torcurve;
fn run_code() {
for i in 0..=10 {
println!("curve {}", torcurve(i as f64 * 0.1, 3.0, 0.0, 0.0));
}
}