Trait Vector

Source
pub trait Vector<T, Rhs = Self, Output = Self>:
    Add<Rhs, Output = Output>
    + Sub<Rhs, Output = Output>
    + Mul<Rhs, Output = Output, Output = Output>
    + Mul<T>
    + Div<Rhs, Output = Output, Output = Output>
    + Div<T>
    + Neg<Output = Output>
    + Clone
    + Copy
where T: Scalar,
{ // Required methods fn zero() -> Self; fn add_vv(l: &Self, r: &Self) -> Self; fn sub_vv(l: &Self, r: &Self) -> Self; fn mul_vv(l: &Self, r: &Self) -> Self; fn div_vv(l: &Self, r: &Self) -> Self; fn mul_vs(l: &Self, r: T) -> Self; fn div_vs(l: &Self, r: T) -> Self; fn rem_vv(l: &Self, r: &Self) -> Self; fn dot(l: &Self, r: &Self) -> T; fn min(l: &Self, r: &Self) -> Self; fn max(l: &Self, r: &Self) -> Self; }

Required Methods§

Source

fn zero() -> Self

Source

fn add_vv(l: &Self, r: &Self) -> Self

Source

fn sub_vv(l: &Self, r: &Self) -> Self

Source

fn mul_vv(l: &Self, r: &Self) -> Self

Source

fn div_vv(l: &Self, r: &Self) -> Self

Source

fn mul_vs(l: &Self, r: T) -> Self

Source

fn div_vs(l: &Self, r: T) -> Self

Source

fn rem_vv(l: &Self, r: &Self) -> Self

Source

fn dot(l: &Self, r: &Self) -> T

Source

fn min(l: &Self, r: &Self) -> Self

Source

fn max(l: &Self, r: &Self) -> Self

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<T> Vector<T> for Vector2<T>
where T: Scalar,

Source§

impl<T> Vector<T> for Vector3<T>
where T: Scalar,

Source§

impl<T> Vector<T> for Vector4<T>
where T: Scalar,