easey 2.0.0

Easing functions for interpolation between 0.0 and 1.0
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
macro_rules! generate_minmax {
    ( $fxx:ident ) => {
        pub fn minmaxp(n: $fxx) -> $fxx {
            minmax(n, 0.0, 1.0)
        }

        pub fn minmax(n: $fxx, min: $fxx, max: $fxx) -> $fxx {
            #[cfg(debug_assertions)]
            {
                if max < min {
                    panic!("minmax called where max is less than min ... minmax({}, {}, {})", n, min, max);
                }
            }

            n.min(max).max(min)
        }
    };
}