Trait VectorExt

Source
pub trait VectorExt: Vector + MulAssign<f32> {
    // Required methods
    fn distance(self, other: Self) -> f32;
    fn magnitude(self) -> f32;
}
Expand description

Vector geometry extensions usable on vectors whose components can be converted into f32.

Required Methods§

Source

fn distance(self, other: Self) -> f32

Compute the distance between two vectors

Source

fn magnitude(self) -> f32

Compute the magnitude of a vector

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<V, A, C> VectorExt for V
where V: Vector<Axes = A, Component = C> + MulAssign<f32>, A: ArrayLength<C>, C: Component + Into<f32>,