[][src]Trait aljabar::InnerSpace

pub trait InnerSpace: VectorSpace where
    Self: Clone,
    Self: MetricSpace<Metric = Self::Scalar>, 
{ fn dot(self, other: Self) -> Self::Scalar; fn magnitude2(self) -> Self::Scalar { ... }
fn reflect(self, surface_normal: Self) -> Self { ... } }

Vector spaces that have an inner (also known as "dot") product.

Required methods

fn dot(self, other: Self) -> Self::Scalar

Return the inner (also known as "dot") product.

Loading content...

Provided methods

fn magnitude2(self) -> Self::Scalar

Returns the squared length of the value.

fn reflect(self, surface_normal: Self) -> Self

Returns the reflection of the current vector with respect to the given surface normal. The surface normal must be of length 1 for the return value to be correct. The current vector is interpreted as pointing toward the surface, and does not need to be normalized.

Loading content...

Implementors

impl<T> InnerSpace for Quaternion<T> where
    T: Clone + Real + Zero + AddAssign
[src]

impl<T, const N: usize> InnerSpace 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>,
    T: AddAssign<T>,
    Self: Clone
[src]

Loading content...