diff options
author | Juan Manuel Tomás <jtomas1815@gmail.com> | 2021-01-17 18:08:45 -0300 |
---|---|---|
committer | Juan Manuel Tomás <jtomas1815@gmail.com> | 2021-01-17 18:08:45 -0300 |
commit | bc4d45fa639e32394081f726cbb1f093eb469b0a (patch) | |
tree | 7d808840fb8f68a42ed04d26c3d6a8bf9cd9e8cb /src/lerp.rs | |
parent | 727b1c2ee98d395429ec1e667279fc3f5fec3a5c (diff) | |
download | bezier-bc4d45fa639e32394081f726cbb1f093eb469b0a.tar.gz bezier-bc4d45fa639e32394081f726cbb1f093eb469b0a.zip |
Remove dead code
Diffstat (limited to 'src/lerp.rs')
-rw-r--r-- | src/lerp.rs | 9 |
1 files changed, 4 insertions, 5 deletions
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<Lerp>, Box<Lerp>), - Leaf(Number, Number), - Just(Number) + Leaf(f32, f32), + Just(f32), } impl Lerp { - pub fn new(v: Vec<Number>) -> Box<Lerp> { + pub fn new(v: Vec<f32>) -> Box<Lerp> { Lerp::new_s(&v[..]) } - fn new_s(v: &[Number]) -> Box<Lerp> { + fn new_s(v: &[f32]) -> Box<Lerp> { match v.len() { 0 => Box::new(Lerp::Just(0.0)), 1 => Box::new(Lerp::Just(v[0])), |