Trait rs_math3d::vector::Vector

source ·
pub trait Vector<T: Scalar, Rhs = Self, Output = Self>: Add<Rhs, Output = Output> + Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Mul<T, Output = Output> + Div<Rhs, Output = Output> + Div<T, Output = Output> + Neg<Output = Output> + Clone + Copy {
    // 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

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T: Scalar> Vector<T> for Vector2<T>

source§

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

source§

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