Trait vector_space::InnerSpace [−][src]
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.