number_easing

Crates.ionumber_easing
lib.rsnumber_easing
version0.1.1
sourcesrc
created_at2017-10-01 23:47:29.123998
updated_at2018-01-27 14:58:53.639991
descriptionnumber easing functions
homepagehttps://gitlab.com/nathanfaucett/rs-number_easing
repositoryhttps://gitlab.com/nathanfaucett/rs-number_easing.git
max_upload_size
id34115
size9,560
Nathan Faucett (nathanfaucett)

documentation

README

number_easing

number easing functions

extern crate number_easing;


use number_easing::{in_out_cubic, in_out_quad};


fn main() {

    assert_eq!(in_out_cubic(0, 100, 0), 0);
    assert_eq!(in_out_cubic(0, 100, 0.25), 6);
    assert_eq!(in_out_cubic(0, 100, 0.5), 50);
    assert_eq!(in_out_cubic(0, 100, 0.75), 93);
    assert_eq!(in_out_cubic(0, 100, 1.0), 100);

    assert_eq!(in_out_quad(0, 100, 0), 0);
    assert_eq!(in_out_quad(0, 100, 0.25), 12);
    assert_eq!(in_out_quad(0, 100, 0.5), 50);
    assert_eq!(in_out_quad(0, 100, 0.75), 87);
    assert_eq!(in_out_quad(0, 100, 1.0), 100);
}
Commit count: 4

cargo fmt