Trait na::NumPnt

source ·
pub trait NumPnt: Sub<Self, Output = Self::Coordinates> + Mul<Self::Field, Output = Self> + Div<Self::Field, Output = Self> + MulAssign<Self::Field> + DivAssign<Self::Field> + Add<Self::Coordinates, Output = Self> + Sub<Self::Coordinates, Output = Self> + AddAssign<Self::Coordinates> + SubAssign<Self::Coordinates> + PartialEq + Sized {
    type Field: BaseNum;
    type Coordinates: Index<usize, Output = Self::Field> + IndexMut<usize> + Add<Self::Coordinates, Output = Self::Coordinates> + Sub<Self::Coordinates, Output = Self::Coordinates> + AddAssign<Self::Coordinates> + SubAssign<Self::Coordinates> + Mul<Self::Field, Output = Self::Coordinates> + Div<Self::Field, Output = Self::Coordinates> + MulAssign<Self::Field> + DivAssign<Self::Field>;

    // Required methods
    fn coordinates(&self) -> Self::Coordinates;
    fn from_coordiantes(coords: Self::Coordinates) -> Self;
}
Expand description

Trait grouping most common operations on points.

Required Associated Types§

source

type Field: BaseNum

source

type Coordinates: Index<usize, Output = Self::Field> + IndexMut<usize> + Add<Self::Coordinates, Output = Self::Coordinates> + Sub<Self::Coordinates, Output = Self::Coordinates> + AddAssign<Self::Coordinates> + SubAssign<Self::Coordinates> + Mul<Self::Field, Output = Self::Coordinates> + Div<Self::Field, Output = Self::Coordinates> + MulAssign<Self::Field> + DivAssign<Self::Field>

Required Methods§

source

fn coordinates(&self) -> Self::Coordinates

source

fn from_coordiantes(coords: Self::Coordinates) -> Self

Implementors§

source§

impl<N: BaseNum> NumPnt for Point1<N>

§

type Field = N

§

type Coordinates = Matrix<N, Const<1>, Const<1>, ArrayStorage<N, 1, 1>>

source§

impl<N: BaseNum> NumPnt for Point2<N>

§

type Field = N

§

type Coordinates = Matrix<N, Const<2>, Const<1>, ArrayStorage<N, 2, 1>>

source§

impl<N: BaseNum> NumPnt for Point3<N>

§

type Field = N

§

type Coordinates = Matrix<N, Const<3>, Const<1>, ArrayStorage<N, 3, 1>>

source§

impl<N: BaseNum> NumPnt for Point4<N>

§

type Field = N

§

type Coordinates = Matrix<N, Const<4>, Const<1>, ArrayStorage<N, 4, 1>>

source§

impl<N: BaseNum> NumPnt for Point5<N>

§

type Field = N

§

type Coordinates = Matrix<N, Const<5>, Const<1>, ArrayStorage<N, 5, 1>>

source§

impl<N: BaseNum> NumPnt for Point6<N>

§

type Field = N

§

type Coordinates = Matrix<N, Const<6>, Const<1>, ArrayStorage<N, 6, 1>>