[][src]Trait aljabar::VectorSpace

pub trait VectorSpace where
    Self: Sized + Zero,
    Self: Add<Self, Output = Self>,
    Self: Sub<Self, Output = Self>,
    Self: Mul<Self::Scalar, Output = Self>,
    Self: Div<Self::Scalar, Output = Self>, 
{ type Scalar: Add<Self::Scalar, Output = Self::Scalar> + Sub<Self::Scalar, Output = Self::Scalar> + Mul<Self::Scalar, Output = Self::Scalar> + Div<Self::Scalar, Output = Self::Scalar>; fn lerp(self, other: Self, amount: Self::Scalar) -> Self; }

Vectors that can be added together and multiplied by scalars form a VectorSpace.

If a Vector implements Add and Sub and its scalar implements Mul and Div, then that vector is part of a VectorSpace.

Associated Types

type Scalar: Add<Self::Scalar, Output = Self::Scalar> + Sub<Self::Scalar, Output = Self::Scalar> + Mul<Self::Scalar, Output = Self::Scalar> + Div<Self::Scalar, Output = Self::Scalar>

Loading content...

Required methods

fn lerp(self, other: Self, amount: Self::Scalar) -> Self

Loading content...

Implementors

impl<T, const N: usize> VectorSpace for Vector<T, { N }> where
    T: Clone + Zero,
    T: Add<T, Output = T>,
    T: Sub<T, Output = T>,
    T: Mul<T, Output = T>,
    T: Div<T, Output = T>, 
[src]

type Scalar = T

Loading content...