summaryrefslogtreecommitdiff
path: root/src/lerp.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lerp.rs')
-rw-r--r--src/lerp.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lerp.rs b/src/lerp.rs
index 2ea444e..222671f 100644
--- a/src/lerp.rs
+++ b/src/lerp.rs
@@ -3,7 +3,7 @@ use crate::poly::Poly;
pub enum Lerp {
Node(Box<Lerp>, Box<Lerp>),
- Leaf(Number, Number)
+ Leaf(Number, Number),
}
impl Lerp {
@@ -16,7 +16,10 @@ impl Lerp {
0 => Box::new(Lerp::Leaf(0.0, 0.0)),
1 => Box::new(Lerp::Leaf(v[0], v[0])),
2 => Box::new(Lerp::Leaf(v[0], v[1])),
- _ => Box::new(Lerp::Node(Lerp::new_s(&v[0..v.len() - 1]), Lerp::new_s(&v[1..v.len()])))
+ _ => Box::new(Lerp::Node(
+ Lerp::new_s(&v[0..v.len() - 1]),
+ Lerp::new_s(&v[1..v.len()]),
+ )),
}
}
}