diff --git a/src/spline.rs b/src/spline.rs index b12b4a1..5bc2674 100644 --- a/src/spline.rs +++ b/src/spline.rs @@ -163,7 +163,7 @@ impl Spline { /// pub fn sample(&self, t: T) -> Option where T: Additive + One + Trigo + Mul + Div + PartialOrd, - V: Interpolate { + V: Additive + Interpolate { self.sample_with_key(t).map(|(v, _, _)| v) } @@ -180,7 +180,7 @@ impl Spline { /// This function returns [`None`] if you have no key. pub fn clamped_sample_with_key(&self, t: T) -> Option<(V, &Key, Option<&Key>)> where T: Additive + One + Trigo + Mul + Div + PartialOrd, - V: Interpolate { + V: Additive + Interpolate { if self.0.is_empty() { return None; } @@ -205,7 +205,7 @@ impl Spline { /// Sample a spline at a given time with clamping. pub fn clamped_sample(&self, t: T) -> Option where T: Additive + One + Trigo + Mul + Div + PartialOrd, - V: Interpolate { + V: Additive + Interpolate { self.clamped_sample_with_key(t).map(|(v, _, _)| v) }