Skip to content
Easing functions for Rust
Rust
Branch: master
Clone or download
Latest commit fa518be Nov 1, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples Get demo building on newer glutin/glium Jun 7, 2018
src Test linear Nov 1, 2018
.gitignore Functions all added Feb 15, 2017
.travis.yml Don't build demo on old rust where dependencies won't build Jun 7, 2018
Cargo.toml 0.2.1 Nov 1, 2018
LICENSE-APACHE License as mit/apache2 Mar 25, 2017
LICENSE-MIT License as mit/apache2 Mar 25, 2017
README.md More docs tweaks Jun 7, 2018
TODO Clippy May 23, 2017
demo.png Progress May 23, 2017
release.toml Release toml Jun 7, 2018

README.md

ezing

Simple easing functions for Rust

Build Status Documentation Version License

[quad, cubic, quart, quint, sine, circ, expo, elastic, back, bounce] x [in, out, inout]

All functions have the signature fn<F: Float>(F) -> F (letting you use f32, f64, or any other type that implements num_traits's Float). Input should range from 0.0 to 1.0, and output is generally in the 0.0 to 1.0 range (except for elastic and back, which return values slightly outside). 0.0 always maps to 0.0, and 1.0 always maps to 1.0. Use 'em to lerp or something:

let current_pos = lerp(ezing::cubic_inout(t), start, end);

You can’t perform that action at this time.