curve 0.11.0

The package provides curves.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use num_traits::Float;

/// A curve whose endpoints can be aligned with the ones of another curve.
pub trait Align<T: Float, U> {
    /// Perform the calculation.
    fn align(self, other: &U) -> Self;
}

impl<T, U, V> Align<T, (U, U)> for (V, V)
where
    T: Float,
    V: Align<T, U>,
{
    #[inline]
    fn align(self, other: &(U, U)) -> Self {
        (self.0.align(&other.0), self.1.align(&other.1))
    }
}