[][src]Struct definitive::Vector

pub struct Vector<T = f32, const N: usize>(_);

A generic type representing an N dimensional vector

Methods

impl<T, const N: usize> Vector<T, { N }>[src]

pub fn new(components: [T; { N }]) -> Self[src]

Create a new vector out of some components

Note: Vector also implements From<[T, {N}]> which can be cleaner

Trait Implementations

impl<T, const N: usize> From<[T; N]> for Vector<T, { N }>[src]

impl<T: Debug, const N: usize> Debug for Vector<T, { N }>[src]

impl<T: Div<Output = T>, const N: usize> Div<Vector<T, N>> for Vector<T, { N }>[src]

type Output = Vector<T, { N }>

The resulting type after applying the / operator.

impl<T: Rem<Output = T>, const N: usize> Rem<Vector<T, N>> for Vector<T, { N }>[src]

type Output = Vector<T, { N }>

The resulting type after applying the % operator.

impl<T: Sub<Output = T>, const N: usize> Sub<Vector<T, N>> for Vector<T, { N }>[src]

type Output = Vector<T, { N }>

The resulting type after applying the - operator.

impl<T: Tr, const N: usize> PartialEq<Vector<T, N>> for Vector<T, { N }>[src]

impl<T: Add<Output = T>, const N: usize> Add<Vector<T, N>> for Vector<T, { N }>[src]

type Output = Vector<T, { N }>

The resulting type after applying the + operator.

impl Add<Vector<f32, { 4 }>> for Vector<f32, { 4 }>[src]

impl<T: Mul<Output = T>, const N: usize> Mul<Vector<T, N>> for Vector<T, { N }>[src]

type Output = Vector<T, { N }>

The resulting type after applying the * operator.

impl<T: AddAssign, const N: usize> AddAssign<Vector<T, N>> for Vector<T, { N }>[src]

impl<T: SubAssign, const N: usize> SubAssign<Vector<T, N>> for Vector<T, { N }>[src]

impl<T: MulAssign, const N: usize> MulAssign<Vector<T, N>> for Vector<T, { N }>[src]

impl<T: DivAssign, const N: usize> DivAssign<Vector<T, N>> for Vector<T, { N }>[src]

impl<T: RemAssign, const N: usize> RemAssign<Vector<T, N>> for Vector<T, { N }>[src]

impl<T, const N: usize> Deref for Vector<T, { N }>[src]

type Target = [T; { N }]

The resulting type after dereferencing.

impl<T: Copy, const N: usize> Copy for Vector<T, { N }>[src]

impl<T: Clone, const N: usize> Clone for Vector<T, { N }>[src]

impl<T: Default, const N: usize> Default for Vector<T, { N }>[src]

Auto Trait Implementations

impl<const N: usize, T> Unpin for Vector<T, N> where
    T: Unpin

impl<const N: usize, T> Send for Vector<T, N> where
    T: Send

impl<const N: usize, T> Sync for Vector<T, N> where
    T: Sync

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]