ranim 0.1.0-alpha.4

An animation engine inspired by manim and JAnim
Documentation
1
2
3
4
5
6
7
8
9
10
11
pub fn linear(t: f32) -> f32 {
    t
}

/// Smooth rate function
///
/// from <https://github.com/3b1b/manim/blob/003c4d86262565bb21001f74f67e6788cae62df4/manimlib/utils/rate_functions.py#L17>
pub fn smooth(t: f32) -> f32 {
    let s = 1.0 - t;
    t * t * t * (10.0 * s * s + 5.0 * s * t + t * t)
}