summaryrefslogtreecommitdiff
path: root/src/lerp.rs
diff options
context:
space:
mode:
authorJuan Manuel Tomás <jtomas1815@gmail.com>2021-01-16 04:33:09 -0300
committerJuan Manuel Tomás <jtomas1815@gmail.com>2021-01-16 04:33:09 -0300
commit76681d40623c8a6b8b48ae1108568ed5b799f7ae (patch)
treeec0a1f303999899e9c1db54d66482a97683cbf29 /src/lerp.rs
parent4f2afb1ca7063206411475bce89669238e41cb2b (diff)
downloadbezier-76681d40623c8a6b8b48ae1108568ed5b799f7ae.tar.gz
bezier-76681d40623c8a6b8b48ae1108568ed5b799f7ae.zip
Run cargo fmt for the first time
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()]),
+ )),
}
}
}