Trait VectorSpace

Source
pub trait VectorSpace:
    Copy
    + Zero
    + PartialEq
where Self: Add<Output = Self> + Sub<Output = Self> + Mul<Self::Scalar, Output = Self> + Div<Self::Scalar, Output = Self> + Neg<Output = Self>,
{ type Scalar: Real + PartialOrd; }
Expand description

This trait specifies some type to be a vector type. It specifies the scalar type and is required for other vector types.

Required Associated Types§

Source

type Scalar: Real + PartialOrd

The scalar type of the vector space.

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.

Implementations on Foreign Types§

Source§

impl VectorSpace for f32

Source§

impl VectorSpace for f64

Implementors§