[][src]Trait aljabar::RealInnerSpace

pub trait RealInnerSpace: InnerSpace where
    Self: Clone,
    Self: MetricSpace<Metric = Self::Scalar>,
    Self::Scalar: Real
{ fn magnitude(self) -> Self::Scalar { ... }
fn normalize(self) -> Self
    where
        Self::Scalar: One
, { ... }
fn normalize_to(self, magnitude: Self::Scalar) -> Self { ... }
fn project_on(self, other: Self) -> Self { ... } }

Defines an InnerSpace where the Scalar is a real number. Automatically implemented.

Provided methods

fn magnitude(self) -> Self::Scalar

Returns the length of the vector.

fn normalize(self) -> Self where
    Self::Scalar: One

Returns a vector with the same direction and a magnitude of 1.

fn normalize_to(self, magnitude: Self::Scalar) -> Self

Returns a vector with the same direction and a given magnitude.

fn project_on(self, other: Self) -> Self

Returns the vector projection of the current inner space projected onto the supplied argument.

Loading content...

Implementors

impl<T> RealInnerSpace for T where
    T: InnerSpace,
    <T as VectorSpace>::Scalar: Real
[src]

Loading content...