Trait vector_space::InnerSpace[][src]

pub trait InnerSpace: DotProduct<Output = Self::Scalar> {
    fn magnitude2(self) -> Self::Scalar { ... }
fn magnitude(self) -> Self::Scalar { ... }
fn normalize(self) -> Self { ... }
fn angle(self, other: Self) -> Self::Scalar { ... }
fn distance(self, other: Self) -> Self::Scalar { ... }
fn with_magnitude(self, magnitude: Self::Scalar) -> Self { ... }
fn with_direction(self, dir: Self) -> Self { ... }
fn query_axis(self, dir: Self) -> Self::Scalar { ... }
fn normalized_project(self, dir: Self) -> Self { ... }
fn project(self, dir: Self) -> Self { ... }
fn normalized_reject(self, dir: Self) -> Self { ... }
fn reject(self, dir: Self) -> Self { ... }
fn normalized_reflect(self, dir: Self) -> Self { ... }
fn reflect(self, dir: Self) -> Self { ... } }

This trait defines the dot product and adds commom vector operations.

Provided methods

fn magnitude2(self) -> Self::Scalar[src]

The squared magnitude.

This is more efficient than calculating the magnitude. Useful if you need the squared magnitude anyway.

fn magnitude(self) -> Self::Scalar[src]

The magnitude of a vector.

fn normalize(self) -> Self[src]

The normalized vector.

fn angle(self, other: Self) -> Self::Scalar[src]

The angle between two vectors.

fn distance(self, other: Self) -> Self::Scalar[src]

The distance between two vectors.

fn with_magnitude(self, magnitude: Self::Scalar) -> Self[src]

Sets the magnitude of a vector.

fn with_direction(self, dir: Self) -> Self[src]

Sets the direction of a vector.

fn query_axis(self, dir: Self) -> Self::Scalar[src]

The value of the vector along the specified axis.

fn normalized_project(self, dir: Self) -> Self[src]

Projects a vector onto an already normalized direction vector.

fn project(self, dir: Self) -> Self[src]

Projects a vector onto an arbitraty direction vector.

fn normalized_reject(self, dir: Self) -> Self[src]

Rejects a vector from an already normalized direction vector.

fn reject(self, dir: Self) -> Self[src]

Rejects a vector from an arbitraty direction vector.

fn normalized_reflect(self, dir: Self) -> Self[src]

Reflects a vector from an already normalized direction vector.

fn reflect(self, dir: Self) -> Self[src]

Reflects a vector from an arbitraty direction vector.

Loading content...

Implementations on Foreign Types

impl InnerSpace for f32[src]

impl InnerSpace for f64[src]

Loading content...

Implementors

Loading content...