eazy_core/interpolation/polynomial/none.rs
1//! The Constant Interpolating Polynomial Curve.
2
3use crate::easing::Curve;
4
5/// The [`None`] Curve.
6///
7/// ```
8/// use eazy::Curve;
9/// use eazy::interpolation::polynomial::none::None;
10///
11/// let p = None.y(1.0);
12/// ```
13#[derive(Debug)]
14pub struct None;
15
16impl Curve for None {
17 #[inline(always)]
18 fn y(&self, _p: f32) -> f32 {
19 1.0
20 }
21}
22
23#[test]
24fn test_none() {
25 let p = None.y(0.8);
26
27 assert_eq!(p, 1.0);
28}