From bc4d45fa639e32394081f726cbb1f093eb469b0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Tom=C3=A1s?= Date: Sun, 17 Jan 2021 18:08:45 -0300 Subject: Remove dead code --- src/lerp.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/lerp.rs') diff --git a/src/lerp.rs b/src/lerp.rs index 1501d0f..b098f23 100644 --- a/src/lerp.rs +++ b/src/lerp.rs @@ -1,18 +1,17 @@ -use crate::number::Number; use crate::poly::Poly; pub enum Lerp { Node(Box, Box), - Leaf(Number, Number), - Just(Number) + Leaf(f32, f32), + Just(f32), } impl Lerp { - pub fn new(v: Vec) -> Box { + pub fn new(v: Vec) -> Box { Lerp::new_s(&v[..]) } - fn new_s(v: &[Number]) -> Box { + fn new_s(v: &[f32]) -> Box { match v.len() { 0 => Box::new(Lerp::Just(0.0)), 1 => Box::new(Lerp::Just(v[0])), -- cgit v1.2.3