summaryrefslogtreecommitdiff
path: root/src/lerp.rs
diff options
context:
space:
mode:
authorJuan Manuel Tomás <jtomas1815@gmail.com>2021-01-14 07:02:19 -0300
committerJuan Manuel Tomás <jtomas1815@gmail.com>2021-01-14 07:02:19 -0300
commited7f00f4d3833877c1e3336ba2bb85d7e3733112 (patch)
tree58e08fe5dc1f1cd2860c288698f4cb29719d2789 /src/lerp.rs
parent620ac8938da180fdf5d342b0f31b0c4059b8757a (diff)
downloadbezier-ed7f00f4d3833877c1e3336ba2bb85d7e3733112.tar.gz
bezier-ed7f00f4d3833877c1e3336ba2bb85d7e3733112.zip
Calculate poly degree on new
Diffstat (limited to 'src/lerp.rs')
-rw-r--r--src/lerp.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lerp.rs b/src/lerp.rs
index 96506df..2ea444e 100644
--- a/src/lerp.rs
+++ b/src/lerp.rs
@@ -23,12 +23,12 @@ impl Lerp {
pub fn lp(l: Box<Lerp>) -> Poly {
match *l {
- Lerp::Leaf(a, b) => Poly(vec![a, b - a]),
+ Lerp::Leaf(a, b) => Poly::new(vec![a, b - a]),
Lerp::Node(a, b) => {
let a = lp(a);
let b = lp(b);
let c = &b - &a;
- &a + &(&c * &Poly(vec![0.0, 1.0]))
+ &a + &(&c * &Poly::new(vec![0.0, 1.0]))
}
}
}