Struct geometric::Vector4 [] [src]

pub struct Vector4<T: Copy> {
    pub components: [T; 4],
}

Fields

Methods

impl<T: Copy> Vector4<T>
[src]

Map a function over vector components

Convenience method for converting between vector types, since a From implementation would conflict with the one in std::core. When converting from a smaller type, the result is padded with Default::default().

impl<T> Vector4<T> where
    T: Copy + Add<Output = T> + Mul<Output = T>, 
[src]

Return the squared magnitude.

impl<T> Vector4<T> where
    T: Float, 
[src]

Return the magnitude.

Return this vector normalized.

impl Vector4<f32>
[src]

impl Vector4<f64>
[src]

impl Vector4<i8>
[src]

impl Vector4<i16>
[src]

impl Vector4<i32>
[src]

impl Vector4<i64>
[src]

impl Vector4<isize>
[src]

Trait Implementations

impl<T: Clone + Copy> Clone for Vector4<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Copy + Copy> Copy for Vector4<T>
[src]

impl<T: Default + Copy> Default for Vector4<T>
[src]

Returns the "default value" for a type. Read more

impl<T: Debug + Copy> Debug for Vector4<T>
[src]

Formats the value using the given formatter.

impl<T: PartialEq + Copy> PartialEq for Vector4<T>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<T: Eq + Copy> Eq for Vector4<T>
[src]

impl<T: Copy> AsRef<[T; 4]> for Vector4<T>
[src]

Performs the conversion.

impl<T: Copy> AsRef<[T]> for Vector4<T>
[src]

Performs the conversion.

impl<T: Copy> From<[T; 4]> for Vector4<T>
[src]

Performs the conversion.

impl<'a, T: Copy + Default> From<&'a [T]> for Vector4<T>
[src]

Performs the conversion.

impl<T: Copy> Add for Vector4<T> where
    T: Add<Output = T>, 
[src]

The resulting type after applying the + operator

The method for the + operator

impl<T: Copy> AddAssign for Vector4<T> where
    T: Add<Output = T>, 
[src]

The method for the += operator

impl<T: Copy> Sub for Vector4<T> where
    T: Sub<Output = T>, 
[src]

The resulting type after applying the - operator

The method for the - operator

impl<T: Copy> SubAssign for Vector4<T> where
    T: Sub<Output = T>, 
[src]

The method for the -= operator

impl<T: Copy> Mul for Vector4<T> where
    T: Mul<Output = T>, 
[src]

The resulting type after applying the * operator

The method for the * operator

impl<T: Copy> MulAssign for Vector4<T> where
    T: Mul<Output = T>, 
[src]

The method for the *= operator

impl<T: Copy> Div for Vector4<T> where
    T: Div<Output = T>, 
[src]

The resulting type after applying the / operator

The method for the / operator

impl<T: Copy> DivAssign for Vector4<T> where
    T: Div<Output = T>, 
[src]

The method for the /= operator

impl<T: Copy> Mul<T> for Vector4<T> where
    T: Mul<Output = T>, 
[src]

The resulting type after applying the * operator

The method for the * operator

impl<T: Copy> MulAssign<T> for Vector4<T> where
    T: Mul<Output = T>, 
[src]

The method for the *= operator

impl<T: Copy> Div<T> for Vector4<T> where
    T: Div<Output = T>, 
[src]

The resulting type after applying the / operator

The method for the / operator

impl<T: Copy> DivAssign<T> for Vector4<T> where
    T: Div<Output = T>, 
[src]

The method for the /= operator

impl<T: Copy> Neg for Vector4<T> where
    T: Neg<Output = T>, 
[src]

The resulting type after applying the - operator

The method for the unary - operator

impl<T: Copy> Dot for Vector4<T> where
    T: Add<Output = T> + Mul<Output = T>, 
[src]

Compute the dot product.

impl<T: Copy> Proj for Vector4<T> where
    T: Add<Output = T> + Mul<Output = T> + Div<Output = T>, 
[src]

Project self onto RHS.