Struct coord::vec1::Vec1[][src]

pub struct Vec1<T: VecItem> {
    pub x: T,
}

Fields

Methods

impl<T: VecItem> Vec1<T>
[src]

Creates a new Vec1 from a single component

Returns the elements of the vector as an array

Apply an operation to all elements of this vector, returning the result

Trait Implementations

impl<T: Copy + VecItem> Copy for Vec1<T>
[src]

impl<T: Clone + VecItem> Clone for Vec1<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Default + VecItem> Default for Vec1<T>
[src]

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

impl<T: Hash + VecItem> Hash for Vec1<T>
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl<T: Eq + VecItem> Eq for Vec1<T>
[src]

impl<T: PartialEq + VecItem> PartialEq for Vec1<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: VecItem> Vector for Vec1<T>
[src]

impl<T: VecItem + Debug> Debug for Vec1<T>
[src]

Formats the value using the given formatter. Read more

impl<T: VecItem + Display> Display for Vec1<T>
[src]

Formats the value using the given formatter. Read more

impl<T: VecItem> From<T> for Vec1<T>
[src]

Performs the conversion.

impl<T: VecItem> From<[T; 1]> for Vec1<T>
[src]

Performs the conversion.

impl<T> Add for Vec1<T> where
    T: VecItem + Add,
    T::Output: VecItem + Add
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl<T> Sub for Vec1<T> where
    T: VecItem + Sub,
    T::Output: VecItem + Sub
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl<T> Mul for Vec1<T> where
    T: VecItem + Mul,
    T::Output: VecItem + Mul
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<T> Div for Vec1<T> where
    T: VecItem + Div,
    T::Output: VecItem + Div
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<T> Add<T> for Vec1<T> where
    T: VecItem + Add,
    T::Output: VecItem + Add
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl<T> Sub<T> for Vec1<T> where
    T: VecItem + Sub,
    T::Output: VecItem + Sub
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl<T> Mul<T> for Vec1<T> where
    T: VecItem + Mul,
    T::Output: VecItem + Mul
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl<T> Div<T> for Vec1<T> where
    T: VecItem + Div,
    T::Output: VecItem + Div
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl<T> AddAssign for Vec1<T> where
    T: VecItem + Add<Output = T>, 
[src]

Performs the += operation.

impl<T> SubAssign for Vec1<T> where
    T: VecItem + Sub<Output = T>, 
[src]

Performs the -= operation.

impl<T> MulAssign for Vec1<T> where
    T: VecItem + Mul<Output = T>, 
[src]

Performs the *= operation.

impl<T> DivAssign for Vec1<T> where
    T: VecItem + Div<Output = T>, 
[src]

Performs the /= operation.

impl<T> AddAssign<T> for Vec1<T> where
    T: VecItem + Add<Output = T>, 
[src]

Performs the += operation.

impl<T> SubAssign<T> for Vec1<T> where
    T: VecItem + Sub<Output = T>, 
[src]

Performs the -= operation.

impl<T> MulAssign<T> for Vec1<T> where
    T: VecItem + Mul<Output = T>, 
[src]

Performs the *= operation.

impl<T> DivAssign<T> for Vec1<T> where
    T: VecItem + Div<Output = T>, 
[src]

Performs the /= operation.

impl<T> VecNum for Vec1<T> where
    T: VecItem + Num
[src]

Calculates the sum of all components of the vector

Calculates the produce of all components of the vector

impl<T> VecInt for Vec1<T> where
    T: VecItem + Integer
[src]

Performs a Eucledian division (i.e: rounds towards negative infinity) operation upon the vector

impl<T> VecSigned for Vec1<T> where
    T: VecItem + Signed
[src]

Calculates the snake length (also known as 'manhattan distance') of the vector Read more

impl<T> VecFloat for Vec1<T> where
    T: VecItem + Float
[src]

Calculates the magnitude of the vector

Calculates the normalized form of the vector (i.e: a vector with identical direction but a magnitude of 1)

Rounds each element of the vector down to the nearest whole number

Rounds each element of the vector up to the nearest whole number

Rounds each element of the vector to the nearest whole number

Auto Trait Implementations

impl<T> Send for Vec1<T> where
    T: Send

impl<T> Sync for Vec1<T> where
    T: Sync