diff options
Diffstat (limited to 'src/lerp.rs')
-rw-r--r-- | src/lerp.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lerp.rs b/src/lerp.rs index b613620..4c829a1 100644 --- a/src/lerp.rs +++ b/src/lerp.rs @@ -1,6 +1,4 @@ -pub mod poly; - -use poly::Poly; +use crate::poly::Poly; pub enum Lerp { Node(Box<Lerp>, Box<Lerp>), @@ -9,7 +7,7 @@ pub enum Lerp { } impl Lerp { - pub fn new(v: Vec<f32>) -> Box<Lerp> { + pub fn new(v: &Vec<f32>) -> Box<Lerp> { Lerp::new_s(&v[..]) } @@ -33,7 +31,7 @@ impl Lerp { let a = a.to_poly(); let b = b.to_poly(); let c = &b - &a; - &a + &(&c * &Poly::new(vec![0.0, 1.0])) + &a + &c.shift() } } } |