Struct vecmat::vec::Vec4 [−][src]
Fields
data: [T; 4]
Methods
impl<T> Vec4<T> where
T: Copy + Default,
[src]
impl<T> Vec4<T> where
T: Copy + Default,
impl<T> Vec4<T> where
T: Copy,
[src]
impl<T> Vec4<T> where
T: Copy,
pub fn from_array(a: [T; 4]) -> Self
[src]
pub fn from_array(a: [T; 4]) -> Self
pub fn from_array_ref(a: &[T; 4]) -> Self
[src]
pub fn from_array_ref(a: &[T; 4]) -> Self
pub fn from_slice(s: &[T]) -> Option<Self>
[src]
pub fn from_slice(s: &[T]) -> Option<Self>
pub fn from_map<F>(f: F) -> Self where
F: Fn(usize) -> T,
[src]
pub fn from_map<F>(f: F) -> Self where
F: Fn(usize) -> T,
pub fn from_scalar(v: T) -> Self
[src]
pub fn from_scalar(v: T) -> Self
impl<'a, T> Vec4<T> where
T: Copy,
[src]
impl<'a, T> Vec4<T> where
T: Copy,
impl<'a, T> Vec4<T> where
T: Copy,
[src]
impl<'a, T> Vec4<T> where
T: Copy,
impl<T> Vec4<T> where
T: Copy,
[src]
impl<T> Vec4<T> where
T: Copy,
impl<T> Vec4<T> where
T: Copy + Integer,
[src]
impl<T> Vec4<T> where
T: Copy + Integer,
pub fn div_floor(&self, other: Vec4<T>) -> Vec4<T>
[src]
pub fn div_floor(&self, other: Vec4<T>) -> Vec4<T>
pub fn mod_floor(&self, other: Vec4<T>) -> Vec4<T>
[src]
pub fn mod_floor(&self, other: Vec4<T>) -> Vec4<T>
pub fn div_mod_floor(&self, other: Vec4<T>) -> (Vec4<T>, Vec4<T>)
[src]
pub fn div_mod_floor(&self, other: Vec4<T>) -> (Vec4<T>, Vec4<T>)
impl<T> Vec4<T> where
T: Copy + Num,
[src]
impl<T> Vec4<T> where
T: Copy + Num,
impl<T> Vec4<T> where
T: Copy + Num + Float,
[src]
impl<T> Vec4<T> where
T: Copy + Num + Float,
impl<T> Vec4<T> where
T: Copy + Zero,
[src]
impl<T> Vec4<T> where
T: Copy + Zero,
impl Vec4<bool>
[src]
impl Vec4<bool>
impl Vec4<bool>
[src]
impl Vec4<bool>
impl<T> Vec4<T> where
T: Copy + PartialEq,
[src]
impl<T> Vec4<T> where
T: Copy + PartialEq,
pub fn veq(&self, vec: Vec4<T>) -> Vec4<bool>
[src]
pub fn veq(&self, vec: Vec4<T>) -> Vec4<bool>
pub fn vne(&self, vec: Vec4<T>) -> Vec4<bool>
[src]
pub fn vne(&self, vec: Vec4<T>) -> Vec4<bool>
impl<T> Vec4<T> where
T: Copy + PartialOrd,
[src]
impl<T> Vec4<T> where
T: Copy + PartialOrd,
pub fn vlt(&self, vec: Vec4<T>) -> Vec4<bool>
[src]
pub fn vlt(&self, vec: Vec4<T>) -> Vec4<bool>
pub fn vle(&self, vec: Vec4<T>) -> Vec4<bool>
[src]
pub fn vle(&self, vec: Vec4<T>) -> Vec4<bool>
pub fn vgt(&self, vec: Vec4<T>) -> Vec4<bool>
[src]
pub fn vgt(&self, vec: Vec4<T>) -> Vec4<bool>
pub fn vge(&self, vec: Vec4<T>) -> Vec4<bool>
[src]
pub fn vge(&self, vec: Vec4<T>) -> Vec4<bool>
impl<T> Vec4<T> where
T: Copy + PartialOrd,
[src]
impl<T> Vec4<T> where
T: Copy + PartialOrd,
impl<T> Vec4<T> where
T: Copy,
[src]
impl<T> Vec4<T> where
T: Copy,
Trait Implementations
impl<T: Clone + Copy> Clone for Vec4<T>
[src]
impl<T: Clone + Copy> Clone for Vec4<T>
fn clone(&self) -> Vec4<T>
[src]
fn clone(&self) -> Vec4<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<T: Copy + Copy> Copy for Vec4<T>
[src]
impl<T: Copy + Copy> Copy for Vec4<T>
impl<T: Debug + Copy> Debug for Vec4<T>
[src]
impl<T: Debug + Copy> Debug for Vec4<T>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T: PartialEq + Copy> PartialEq for Vec4<T>
[src]
impl<T: PartialEq + Copy> PartialEq for Vec4<T>
fn eq(&self, other: &Vec4<T>) -> bool
[src]
fn eq(&self, other: &Vec4<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Vec4<T>) -> bool
[src]
fn ne(&self, other: &Vec4<T>) -> bool
This method tests for !=
.
impl<T> Index<usize> for Vec4<T> where
T: Copy,
[src]
impl<T> Index<usize> for Vec4<T> where
T: Copy,
type Output = T
The returned type after indexing.
fn index(&self, i: usize) -> &Self::Output
[src]
fn index(&self, i: usize) -> &Self::Output
Performs the indexing (container[index]
) operation.
impl<T> IndexMut<usize> for Vec4<T> where
T: Copy,
[src]
impl<T> IndexMut<usize> for Vec4<T> where
T: Copy,
fn index_mut(&mut self, i: usize) -> &mut Self::Output
[src]
fn index_mut(&mut self, i: usize) -> &mut Self::Output
Performs the mutable indexing (container[index]
) operation.
impl<T> Default for Vec4<T> where
T: Copy + Default,
[src]
impl<T> Default for Vec4<T> where
T: Copy + Default,
impl<'a, T> IntoIterator for &'a Vec4<T> where
T: Copy,
[src]
impl<'a, T> IntoIterator for &'a Vec4<T> where
T: Copy,
type Item = &'a T
The type of the elements being iterated over.
type IntoIter = Iter<'a, T>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
fn into_iter(self) -> Self::IntoIter
Creates an iterator from a value. Read more
impl<'a, T> IntoIterator for &'a mut Vec4<T> where
T: Copy,
[src]
impl<'a, T> IntoIterator for &'a mut Vec4<T> where
T: Copy,
type Item = &'a mut T
The type of the elements being iterated over.
type IntoIter = IterMut<'a, T>
Which kind of iterator are we turning this into?
fn into_iter(self) -> Self::IntoIter
[src]
fn into_iter(self) -> Self::IntoIter
Creates an iterator from a value. Read more
impl<T> Display for Vec4<T> where
T: Copy + Display,
[src]
impl<T> Display for Vec4<T> where
T: Copy + Display,
fn fmt(&self, f: &mut Formatter) -> FmtResult
[src]
fn fmt(&self, f: &mut Formatter) -> FmtResult
Formats the value using the given formatter. Read more
impl<T> Neg for Vec4<T> where
T: Copy + Num + Signed,
[src]
impl<T> Neg for Vec4<T> where
T: Copy + Num + Signed,
type Output = Vec4<T>
The resulting type after applying the -
operator.
fn neg(self) -> Self::Output
[src]
fn neg(self) -> Self::Output
Performs the unary -
operation.
impl<T> Add for Vec4<T> where
T: Copy + Num + Add<Output = T>,
[src]
impl<T> Add for Vec4<T> where
T: Copy + Num + Add<Output = T>,
type Output = Vec4<T>
The resulting type after applying the +
operator.
fn add(self, vec: Vec4<T>) -> Self::Output
[src]
fn add(self, vec: Vec4<T>) -> Self::Output
Performs the +
operation.
impl<T> Sub for Vec4<T> where
T: Copy + Num + Sub<Output = T>,
[src]
impl<T> Sub for Vec4<T> where
T: Copy + Num + Sub<Output = T>,
type Output = Vec4<T>
The resulting type after applying the -
operator.
fn sub(self, vec: Vec4<T>) -> Self::Output
[src]
fn sub(self, vec: Vec4<T>) -> Self::Output
Performs the -
operation.
impl<T> AddAssign for Vec4<T> where
T: Copy + Num + Add<Output = T>,
[src]
impl<T> AddAssign for Vec4<T> where
T: Copy + Num + Add<Output = T>,
fn add_assign(&mut self, vec: Vec4<T>)
[src]
fn add_assign(&mut self, vec: Vec4<T>)
Performs the +=
operation.
impl<T> SubAssign for Vec4<T> where
T: Copy + Num + Sub<Output = T>,
[src]
impl<T> SubAssign for Vec4<T> where
T: Copy + Num + Sub<Output = T>,
fn sub_assign(&mut self, vec: Vec4<T>)
[src]
fn sub_assign(&mut self, vec: Vec4<T>)
Performs the -=
operation.
impl<T> Mul for Vec4<T> where
T: Copy + Num + Mul<Output = T>,
[src]
impl<T> Mul for Vec4<T> where
T: Copy + Num + Mul<Output = T>,
type Output = Vec4<T>
The resulting type after applying the *
operator.
fn mul(self, vec: Vec4<T>) -> Self::Output
[src]
fn mul(self, vec: Vec4<T>) -> Self::Output
Performs the *
operation.
impl<T> Mul<T> for Vec4<T> where
T: Copy + Num + Mul<Output = T>,
[src]
impl<T> Mul<T> for Vec4<T> where
T: Copy + Num + Mul<Output = T>,
type Output = Vec4<T>
The resulting type after applying the *
operator.
fn mul(self, a: T) -> Self::Output
[src]
fn mul(self, a: T) -> Self::Output
Performs the *
operation.
impl<T> Div for Vec4<T> where
T: Copy + Num + Div<Output = T>,
[src]
impl<T> Div for Vec4<T> where
T: Copy + Num + Div<Output = T>,
type Output = Vec4<T>
The resulting type after applying the /
operator.
fn div(self, vec: Vec4<T>) -> Self::Output
[src]
fn div(self, vec: Vec4<T>) -> Self::Output
Performs the /
operation.
impl<T> Div<T> for Vec4<T> where
T: Copy + Num + Div<Output = T>,
[src]
impl<T> Div<T> for Vec4<T> where
T: Copy + Num + Div<Output = T>,
type Output = Vec4<T>
The resulting type after applying the /
operator.
fn div(self, a: T) -> Self::Output
[src]
fn div(self, a: T) -> Self::Output
Performs the /
operation.
impl<T> Rem for Vec4<T> where
T: Copy + Num + Rem<Output = T>,
[src]
impl<T> Rem for Vec4<T> where
T: Copy + Num + Rem<Output = T>,
type Output = Vec4<T>
The resulting type after applying the %
operator.
fn rem(self, vec: Vec4<T>) -> Self::Output
[src]
fn rem(self, vec: Vec4<T>) -> Self::Output
Performs the %
operation.
impl<T> Rem<T> for Vec4<T> where
T: Copy + Num + Rem<Output = T>,
[src]
impl<T> Rem<T> for Vec4<T> where
T: Copy + Num + Rem<Output = T>,
type Output = Vec4<T>
The resulting type after applying the %
operator.
fn rem(self, a: T) -> Self::Output
[src]
fn rem(self, a: T) -> Self::Output
Performs the %
operation.
impl<T> MulAssign for Vec4<T> where
T: Copy + Num + Mul<Output = T>,
[src]
impl<T> MulAssign for Vec4<T> where
T: Copy + Num + Mul<Output = T>,
fn mul_assign(&mut self, vec: Vec4<T>)
[src]
fn mul_assign(&mut self, vec: Vec4<T>)
Performs the *=
operation.
impl<T> MulAssign<T> for Vec4<T> where
T: Copy + Num + Mul<Output = T>,
[src]
impl<T> MulAssign<T> for Vec4<T> where
T: Copy + Num + Mul<Output = T>,
fn mul_assign(&mut self, a: T)
[src]
fn mul_assign(&mut self, a: T)
Performs the *=
operation.
impl<T> DivAssign for Vec4<T> where
T: Copy + Num + Div<Output = T>,
[src]
impl<T> DivAssign for Vec4<T> where
T: Copy + Num + Div<Output = T>,
fn div_assign(&mut self, vec: Vec4<T>)
[src]
fn div_assign(&mut self, vec: Vec4<T>)
Performs the /=
operation.
impl<T> DivAssign<T> for Vec4<T> where
T: Copy + Num + Div<Output = T>,
[src]
impl<T> DivAssign<T> for Vec4<T> where
T: Copy + Num + Div<Output = T>,
fn div_assign(&mut self, a: T)
[src]
fn div_assign(&mut self, a: T)
Performs the /=
operation.
impl<T> RemAssign for Vec4<T> where
T: Copy + Num + Rem<Output = T>,
[src]
impl<T> RemAssign for Vec4<T> where
T: Copy + Num + Rem<Output = T>,
fn rem_assign(&mut self, vec: Vec4<T>)
[src]
fn rem_assign(&mut self, vec: Vec4<T>)
Performs the %=
operation.
impl<T> RemAssign<T> for Vec4<T> where
T: Copy + Num + Rem<Output = T>,
[src]
impl<T> RemAssign<T> for Vec4<T> where
T: Copy + Num + Rem<Output = T>,
fn rem_assign(&mut self, a: T)
[src]
fn rem_assign(&mut self, a: T)
Performs the %=
operation.
impl<T> Dot<Vec4<T>> for Vec4<T> where
T: Copy + Num,
[src]
impl<T> Dot<Vec4<T>> for Vec4<T> where
T: Copy + Num,
impl<T> Zero for Vec4<T> where
T: Copy + Num + Zero,
[src]
impl<T> Zero for Vec4<T> where
T: Copy + Num + Zero,
fn zero() -> Self
[src]
fn zero() -> Self
Returns the additive identity element of Self
, 0
. Read more
fn is_zero(&self) -> bool
[src]
fn is_zero(&self) -> bool
Returns true
if self
is equal to the additive identity.
impl Not for Vec4<bool>
[src]
impl Not for Vec4<bool>
type Output = Vec4<bool>
The resulting type after applying the !
operator.
fn not(self) -> Self::Output
[src]
fn not(self) -> Self::Output
Performs the unary !
operation.
impl BitAnd for Vec4<bool>
[src]
impl BitAnd for Vec4<bool>
type Output = Vec4<bool>
The resulting type after applying the &
operator.
fn bitand(self, other: Vec4<bool>) -> Self::Output
[src]
fn bitand(self, other: Vec4<bool>) -> Self::Output
Performs the &
operation.
impl BitOr for Vec4<bool>
[src]
impl BitOr for Vec4<bool>
type Output = Vec4<bool>
The resulting type after applying the |
operator.
fn bitor(self, other: Vec4<bool>) -> Self::Output
[src]
fn bitor(self, other: Vec4<bool>) -> Self::Output
Performs the |
operation.
impl BitXor for Vec4<bool>
[src]
impl BitXor for Vec4<bool>
type Output = Vec4<bool>
The resulting type after applying the ^
operator.
fn bitxor(self, other: Vec4<bool>) -> Self::Output
[src]
fn bitxor(self, other: Vec4<bool>) -> Self::Output
Performs the ^
operation.
impl BitAndAssign for Vec4<bool>
[src]
impl BitAndAssign for Vec4<bool>
fn bitand_assign(&mut self, other: Vec4<bool>)
[src]
fn bitand_assign(&mut self, other: Vec4<bool>)
Performs the &=
operation.
impl BitOrAssign for Vec4<bool>
[src]
impl BitOrAssign for Vec4<bool>
fn bitor_assign(&mut self, other: Vec4<bool>)
[src]
fn bitor_assign(&mut self, other: Vec4<bool>)
Performs the |=
operation.
impl BitXorAssign for Vec4<bool>
[src]
impl BitXorAssign for Vec4<bool>
fn bitxor_assign(&mut self, other: Vec4<bool>)
[src]
fn bitxor_assign(&mut self, other: Vec4<bool>)
Performs the ^=
operation.
impl Mul<Vec4<i8>> for i8
[src]
impl Mul<Vec4<i8>> for i8
type Output = Vec4<i8>
The resulting type after applying the *
operator.
fn mul(self, a: Vec4<i8>) -> Self::Output
[src]
fn mul(self, a: Vec4<i8>) -> Self::Output
Performs the *
operation.
impl Mul<Vec4<u8>> for u8
[src]
impl Mul<Vec4<u8>> for u8
type Output = Vec4<u8>
The resulting type after applying the *
operator.
fn mul(self, a: Vec4<u8>) -> Self::Output
[src]
fn mul(self, a: Vec4<u8>) -> Self::Output
Performs the *
operation.
impl Mul<Vec4<i16>> for i16
[src]
impl Mul<Vec4<i16>> for i16
type Output = Vec4<i16>
The resulting type after applying the *
operator.
fn mul(self, a: Vec4<i16>) -> Self::Output
[src]
fn mul(self, a: Vec4<i16>) -> Self::Output
Performs the *
operation.
impl Mul<Vec4<u16>> for u16
[src]
impl Mul<Vec4<u16>> for u16
type Output = Vec4<u16>
The resulting type after applying the *
operator.
fn mul(self, a: Vec4<u16>) -> Self::Output
[src]
fn mul(self, a: Vec4<u16>) -> Self::Output
Performs the *
operation.
impl Mul<Vec4<i32>> for i32
[src]
impl Mul<Vec4<i32>> for i32
type Output = Vec4<i32>
The resulting type after applying the *
operator.
fn mul(self, a: Vec4<i32>) -> Self::Output
[src]
fn mul(self, a: Vec4<i32>) -> Self::Output
Performs the *
operation.
impl Mul<Vec4<u32>> for u32
[src]
impl Mul<Vec4<u32>> for u32
type Output = Vec4<u32>
The resulting type after applying the *
operator.
fn mul(self, a: Vec4<u32>) -> Self::Output
[src]
fn mul(self, a: Vec4<u32>) -> Self::Output
Performs the *
operation.
impl Mul<Vec4<i64>> for i64
[src]
impl Mul<Vec4<i64>> for i64
type Output = Vec4<i64>
The resulting type after applying the *
operator.
fn mul(self, a: Vec4<i64>) -> Self::Output
[src]
fn mul(self, a: Vec4<i64>) -> Self::Output
Performs the *
operation.
impl Mul<Vec4<u64>> for u64
[src]
impl Mul<Vec4<u64>> for u64
type Output = Vec4<u64>
The resulting type after applying the *
operator.
fn mul(self, a: Vec4<u64>) -> Self::Output
[src]
fn mul(self, a: Vec4<u64>) -> Self::Output
Performs the *
operation.
impl Mul<Vec4<f32>> for f32
[src]
impl Mul<Vec4<f32>> for f32
type Output = Vec4<f32>
The resulting type after applying the *
operator.
fn mul(self, a: Vec4<f32>) -> Self::Output
[src]
fn mul(self, a: Vec4<f32>) -> Self::Output
Performs the *
operation.
impl Mul<Vec4<f64>> for f64
[src]
impl Mul<Vec4<f64>> for f64
type Output = Vec4<f64>
The resulting type after applying the *
operator.
fn mul(self, a: Vec4<f64>) -> Self::Output
[src]
fn mul(self, a: Vec4<f64>) -> Self::Output
Performs the *
operation.
impl<T> Outer<Vec2<T>> for Vec4<T> where
T: Copy + Num,
[src]
impl<T> Outer<Vec2<T>> for Vec4<T> where
T: Copy + Num,
impl<T> Dot<Mat2x4<T>> for Vec4<T> where
T: Copy + Num,
[src]
impl<T> Dot<Mat2x4<T>> for Vec4<T> where
T: Copy + Num,
impl<T> Outer<Vec3<T>> for Vec4<T> where
T: Copy + Num,
[src]
impl<T> Outer<Vec3<T>> for Vec4<T> where
T: Copy + Num,
impl<T> Dot<Mat3x4<T>> for Vec4<T> where
T: Copy + Num,
[src]
impl<T> Dot<Mat3x4<T>> for Vec4<T> where
T: Copy + Num,
impl<T> Outer<Vec4<T>> for Vec2<T> where
T: Copy + Num,
[src]
impl<T> Outer<Vec4<T>> for Vec2<T> where
T: Copy + Num,
impl<T> Dot<Vec4<T>> for Mat4x2<T> where
T: Copy + Num,
[src]
impl<T> Dot<Vec4<T>> for Mat4x2<T> where
T: Copy + Num,
impl<T> Outer<Vec4<T>> for Vec3<T> where
T: Copy + Num,
[src]
impl<T> Outer<Vec4<T>> for Vec3<T> where
T: Copy + Num,
impl<T> Dot<Vec4<T>> for Mat4x3<T> where
T: Copy + Num,
[src]
impl<T> Dot<Vec4<T>> for Mat4x3<T> where
T: Copy + Num,
impl<T> Outer<Vec4<T>> for Vec4<T> where
T: Copy + Num,
[src]
impl<T> Outer<Vec4<T>> for Vec4<T> where
T: Copy + Num,
impl<T> Dot<Vec4<T>> for Mat4x4<T> where
T: Copy + Num,
[src]
impl<T> Dot<Vec4<T>> for Mat4x4<T> where
T: Copy + Num,
impl<T> Dot<Mat4x4<T>> for Vec4<T> where
T: Copy + Num,
[src]
impl<T> Dot<Mat4x4<T>> for Vec4<T> where
T: Copy + Num,