Struct dvec::Vec2 [] [src]

#[repr(C)]
pub struct Vec2<T> { pub x: T, pub y: T, }

2-dimensional vector type.

Fields

Methods

impl<T> Vec2<T>
[src]

Trait Implementations

impl<T: Clone> Clone for Vec2<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Copy> Copy for Vec2<T>
[src]

impl<T: Debug> Debug for Vec2<T>
[src]

Formats the value using the given formatter.

impl<T: Default> Default for Vec2<T>
[src]

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

impl<T: Eq> Eq for Vec2<T>
[src]

impl<T: Hash> Hash for Vec2<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: PartialEq> PartialEq for Vec2<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> From<(T, T)> for Vec2<T>
[src]

Performs the conversion.

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

Performs the conversion.

impl<T> Into<(T, T)> for Vec2<T>
[src]

Performs the conversion.

impl<S, T> Lerp<T> for Vec2<S> where
    S: Lerp<T>,
    T: Copy
[src]

impl<T> Zero for Vec2<T> where
    T: Zero
[src]

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

The resulting type after applying the * operator

The method for the * operator

impl<'a, T> Mul<&'a T> for Vec2<T> where
    T: Mul<&'a T, Output = T>, 
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'a, T> Mul<T> for &'a Vec2<T> where
    T: Copy,
    &'a T: Mul<T, Output = T>, 
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'a, 'b, T> Mul<&'b T> for &'a Vec2<T> where
    &'a T: Mul<&'b T, Output = T>, 
[src]

The resulting type after applying the * operator

The method for the * operator

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

The resulting type after applying the / operator

The method for the / operator

impl<'a, T> Div<&'a T> for Vec2<T> where
    T: Div<&'a T, Output = T>, 
[src]

The resulting type after applying the / operator

The method for the / operator

impl<'a, T> Div<T> for &'a Vec2<T> where
    T: Copy,
    &'a T: Div<T, Output = T>, 
[src]

The resulting type after applying the / operator

The method for the / operator

impl<'a, 'b, T> Div<&'b T> for &'a Vec2<T> where
    &'a T: Div<&'b T, Output = T>, 
[src]

The resulting type after applying the / operator

The method for the / operator

impl<T> MulAssign<T> for Vec2<T> where
    T: Copy + MulAssign
[src]

The method for the *= operator

impl<'a, T> MulAssign<&'a T> for Vec2<T> where
    T: MulAssign<&'a T>, 
[src]

The method for the *= operator

impl<T> DivAssign<T> for Vec2<T> where
    T: Copy + DivAssign
[src]

The method for the /= operator

impl<'a, T> DivAssign<&'a T> for Vec2<T> where
    T: DivAssign<&'a T>, 
[src]

The method for the /= operator

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

The resulting type after applying the + operator

The method for the + operator

impl<'a, T> Add<&'a Vec2<T>> for Vec2<T> where
    T: Add<&'a T, Output = T>, 
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'a, T> Add<Vec2<T>> for &'a Vec2<T> where
    &'a T: Add<T, Output = T>, 
[src]

The resulting type after applying the + operator

The method for the + operator

impl<'a, 'b, T> Add<&'b Vec2<T>> for &'a Vec2<T> where
    &'a T: Add<&'b T, Output = T>, 
[src]

The resulting type after applying the + operator

The method for the + operator

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

The resulting type after applying the - operator

The method for the - operator

impl<'a, T> Sub<&'a Vec2<T>> for Vec2<T> where
    T: Sub<&'a T, Output = T>, 
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'a, T> Sub<Vec2<T>> for &'a Vec2<T> where
    &'a T: Sub<T, Output = T>, 
[src]

The resulting type after applying the - operator

The method for the - operator

impl<'a, 'b, T> Sub<&'b Vec2<T>> for &'a Vec2<T> where
    &'a T: Sub<&'b T, Output = T>, 
[src]

The resulting type after applying the - operator

The method for the - operator

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

The resulting type after applying the * operator

The method for the * operator

impl<'a, T> Mul<&'a Vec2<T>> for Vec2<T> where
    T: Mul<&'a T, Output = T>, 
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'a, T> Mul<Vec2<T>> for &'a Vec2<T> where
    &'a T: Mul<T, Output = T>, 
[src]

The resulting type after applying the * operator

The method for the * operator

impl<'a, 'b, T> Mul<&'b Vec2<T>> for &'a Vec2<T> where
    &'a T: Mul<&'b T, Output = T>, 
[src]

The resulting type after applying the * operator

The method for the * operator

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

The resulting type after applying the / operator

The method for the / operator

impl<'a, T> Div<&'a Vec2<T>> for Vec2<T> where
    T: Div<&'a T, Output = T>, 
[src]

The resulting type after applying the / operator

The method for the / operator

impl<'a, T> Div<Vec2<T>> for &'a Vec2<T> where
    &'a T: Div<T, Output = T>, 
[src]

The resulting type after applying the / operator

The method for the / operator

impl<'a, 'b, T> Div<&'b Vec2<T>> for &'a Vec2<T> where
    &'a T: Div<&'b T, Output = T>, 
[src]

The resulting type after applying the / operator

The method for the / operator

impl<T> AddAssign for Vec2<T> where
    T: AddAssign
[src]

The method for the += operator

impl<'a, T> AddAssign<&'a Vec2<T>> for Vec2<T> where
    T: AddAssign<&'a T>, 
[src]

The method for the += operator

impl<T> SubAssign for Vec2<T> where
    T: SubAssign
[src]

The method for the -= operator

impl<'a, T> SubAssign<&'a Vec2<T>> for Vec2<T> where
    T: SubAssign<&'a T>, 
[src]

The method for the -= operator

impl<T> MulAssign for Vec2<T> where
    T: MulAssign
[src]

The method for the *= operator

impl<'a, T> MulAssign<&'a Vec2<T>> for Vec2<T> where
    T: MulAssign<&'a T>, 
[src]

The method for the *= operator

impl<T> Add<(T, T)> for Vec2<T> where
    T: Add<Output = T>, 
[src]

The resulting type after applying the + operator

The method for the + operator

impl<T> Sub<(T, T)> for Vec2<T> where
    T: Sub<Output = T>, 
[src]

The resulting type after applying the - operator

The method for the - operator

impl<T> Mul<(T, T)> for Vec2<T> where
    T: Mul<Output = T>, 
[src]

The resulting type after applying the * operator

The method for the * operator

impl<T> Div<(T, T)> for Vec2<T> where
    T: Div<Output = T>, 
[src]

The resulting type after applying the / operator

The method for the / operator

impl<T> AddAssign<(T, T)> for Vec2<T> where
    T: AddAssign
[src]

The method for the += operator

impl<T> SubAssign<(T, T)> for Vec2<T> where
    T: SubAssign
[src]

The method for the -= operator

impl<T> MulAssign<(T, T)> for Vec2<T> where
    T: MulAssign
[src]

The method for the *= operator

impl<T> DivAssign<(T, T)> for Vec2<T> where
    T: DivAssign
[src]

The method for the /= operator

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

impl<'a, T> Dot<&'a Vec2<T>> for Vec2<T> where
    T: Add<Output = T> + Mul<&'a T, Output = T>, 
[src]

impl<'a, T> Dot<Vec2<T>> for &'a Vec2<T> where
    T: Add<Output = T>,
    &'a T: Mul<T, Output = T>, 
[src]

impl<'a, 'b, T> Dot<&'b Vec2<T>> for &'a Vec2<T> where
    T: Add<Output = T>,
    &'a T: Mul<&'b T, Output = T>, 
[src]

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

The resulting type after applying the - operator

The method for the unary - operator

impl<'a, T> Neg for &'a Vec2<T> where
    &'a T: Neg<Output = T>, 
[src]

The resulting type after applying the - operator

The method for the unary - operator