[−][src]Struct definitive::Vector
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.
default fn div(self, rhs: Self) -> Self::Output
[src]
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.
default fn rem(self, rhs: Self) -> Self::Output
[src]
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.
default fn sub(self, rhs: Self) -> Self::Output
[src]
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.
default fn add(self, rhs: Self) -> Self::Output
[src]
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.
default fn mul(self, rhs: Self) -> Self::Output
[src]
impl<T: AddAssign, const N: usize> AddAssign<Vector<T, N>> for Vector<T, { N }>
[src]
fn add_assign(&mut self, rhs: Self)
[src]
impl<T: SubAssign, const N: usize> SubAssign<Vector<T, N>> for Vector<T, { N }>
[src]
fn sub_assign(&mut self, rhs: Self)
[src]
impl<T: MulAssign, const N: usize> MulAssign<Vector<T, N>> for Vector<T, { N }>
[src]
fn mul_assign(&mut self, rhs: Self)
[src]
impl<T: DivAssign, const N: usize> DivAssign<Vector<T, N>> for Vector<T, { N }>
[src]
fn div_assign(&mut self, rhs: Self)
[src]
impl<T: RemAssign, const N: usize> RemAssign<Vector<T, N>> for Vector<T, { N }>
[src]
fn rem_assign(&mut self, rhs: Self)
[src]
impl<T, const N: usize> Deref for Vector<T, { N }>
[src]
type Target = [T; { N }]
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target
[src]
impl<T: Copy, const N: usize> Copy for Vector<T, { N }>
[src]
impl<T: Clone, const N: usize> Clone for Vector<T, { N }>
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[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,
T: Unpin,
impl<const N: usize, T> Send for Vector<T, N> where
T: Send,
T: Send,
impl<const N: usize, T> Sync for Vector<T, N> where
T: Sync,
T: Sync,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,