roundtrip

Function roundtrip 

Source
pub fn roundtrip(t: f32) -> f32
Expand description

A linear easing that goes from 0.0 to 1.0 and back to 0.0. That might be used in combination with other easing functions.

ยงExample

use ::simple_easing::{cubic_in, roundtrip};
let ascending = cubic_in(roundtrip(0.25));
let descending = cubic_in(roundtrip(0.75));
assert!((ascending - descending).abs() < 0.001);