Struct aurum_linear::Vec2
[−]
[src]
pub struct Vec2<T>(pub T, pub T);
Two dimensional vector structure.
Methods
impl<T> Vec2<T>
[src]
fn dot(self, rhs: Vec2<T>) -> T where
T: Add<Output = T> + Mul<Output = T>,
T: Add<Output = T> + Mul<Output = T>,
fn magnitude(self) -> T where
T: Copy + Add<Output = T> + Mul<Output = T> + Sqrt,
T: Copy + Add<Output = T> + Mul<Output = T> + Sqrt,
fn product(self) -> T where
T: Mul<Output = T>,
T: Mul<Output = T>,
fn square_magnitude(self) -> T where
T: Copy + Add<Output = T> + Mul<Output = T>,
T: Copy + Add<Output = T> + Mul<Output = T>,
fn sum(self) -> T where
T: Add<Output = T>,
T: Add<Output = T>,
fn x(self) -> T
fn y(self) -> T
Trait Implementations
impl<T: Clone> Clone for Vec2<T>
[src]
fn clone(&self) -> Vec2<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<T: Copy> Copy for Vec2<T>
[src]
impl<T: Debug> Debug for Vec2<T>
[src]
impl<T: Default> Default for Vec2<T>
[src]
impl<T: Eq> Eq for Vec2<T>
[src]
impl<T: Hash> Hash for Vec2<T>
[src]
fn hash<__HT: Hasher>(&self, __arg_0: &mut __HT)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<T: PartialEq> PartialEq for Vec2<T>
[src]
fn eq(&self, __arg_0: &Vec2<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Vec2<T>) -> bool
This method tests for !=
.
impl<T> From<Complex<T>> for Vec2<T>
[src]
impl<S: Lerp<T>, T: Copy> Lerp<T> for Vec2<S>
[src]
impl<T: One> One for Vec2<T>
[src]
impl<F, T: RawFrom<F>> RawFrom<Vec2<F>> for Vec2<T>
[src]
impl<T: Zero> Zero for Vec2<T>
[src]
impl<T: Neg> Neg for Vec2<T>
[src]
type Output = Vec2<T::Output>
The resulting type after applying the -
operator
fn neg(self) -> Vec2<T::Output>
The method for the unary -
operator
impl<T: Not> Not for Vec2<T>
[src]
type Output = Vec2<T::Output>
The resulting type after applying the !
operator
fn not(self) -> Vec2<T::Output>
The method for the unary !
operator
impl<T: Mul<Output = T> + Copy> Mul<T> for Vec2<T>
[src]
type Output = Vec2<T>
The resulting type after applying the *
operator
fn mul(self, rhs: T) -> Vec2<T>
The method for the *
operator
impl<T: Div<Output = T> + Copy> Div<T> for Vec2<T>
[src]
type Output = Vec2<T>
The resulting type after applying the /
operator
fn div(self, rhs: T) -> Vec2<T>
The method for the /
operator
impl<T: Rem<Output = T> + Copy> Rem<T> for Vec2<T>
[src]
type Output = Vec2<T>
The resulting type after applying the %
operator
fn rem(self, rhs: T) -> Vec2<T>
The method for the %
operator
impl<T: BitAnd<Output = T> + Copy> BitAnd<T> for Vec2<T>
[src]
type Output = Vec2<T>
The resulting type after applying the &
operator
fn bitand(self, rhs: T) -> Vec2<T>
The method for the &
operator
impl<T: BitOr<Output = T> + Copy> BitOr<T> for Vec2<T>
[src]
type Output = Vec2<T>
The resulting type after applying the |
operator
fn bitor(self, rhs: T) -> Vec2<T>
The method for the |
operator
impl<T: BitXor<Output = T> + Copy> BitXor<T> for Vec2<T>
[src]
type Output = Vec2<T>
The resulting type after applying the ^
operator
fn bitxor(self, rhs: T) -> Vec2<T>
The method for the ^
operator
impl<T: Add<Output = T>> Add for Vec2<T>
[src]
type Output = Vec2<T>
The resulting type after applying the +
operator
fn add(self, rhs: Vec2<T>) -> Vec2<T>
The method for the +
operator
impl<T: Sub<Output = T>> Sub for Vec2<T>
[src]
type Output = Vec2<T>
The resulting type after applying the -
operator
fn sub(self, rhs: Vec2<T>) -> Vec2<T>
The method for the -
operator
impl<T: Mul<Output = T>> Mul for Vec2<T>
[src]
type Output = Vec2<T>
The resulting type after applying the *
operator
fn mul(self, rhs: Vec2<T>) -> Vec2<T>
The method for the *
operator
impl<T: Div<Output = T>> Div for Vec2<T>
[src]
type Output = Vec2<T>
The resulting type after applying the /
operator
fn div(self, rhs: Vec2<T>) -> Vec2<T>
The method for the /
operator
impl<T: Rem<Output = T>> Rem for Vec2<T>
[src]
type Output = Vec2<T>
The resulting type after applying the %
operator
fn rem(self, rhs: Vec2<T>) -> Vec2<T>
The method for the %
operator
impl<T: BitAnd<Output = T>> BitAnd for Vec2<T>
[src]
type Output = Vec2<T>
The resulting type after applying the &
operator
fn bitand(self, rhs: Vec2<T>) -> Vec2<T>
The method for the &
operator
impl<T: BitOr<Output = T>> BitOr for Vec2<T>
[src]
type Output = Vec2<T>
The resulting type after applying the |
operator
fn bitor(self, rhs: Vec2<T>) -> Vec2<T>
The method for the |
operator
impl<T: BitXor<Output = T>> BitXor for Vec2<T>
[src]
type Output = Vec2<T>
The resulting type after applying the ^
operator
fn bitxor(self, rhs: Vec2<T>) -> Vec2<T>
The method for the ^
operator
impl<T: TryAdd<Output = T>> TryAdd for Vec2<T>
[src]
impl<T: TrySub<Output = T>> TrySub for Vec2<T>
[src]
impl<T: TryMul<Output = T>> TryMul for Vec2<T>
[src]
impl<T: TryDiv<Output = T>> TryDiv for Vec2<T>
[src]
impl<R: Copy, T: Shl<R, Output = T>> Shl<R> for Vec2<T>
[src]
type Output = Vec2<T>
The resulting type after applying the <<
operator
fn shl(self, rhs: R) -> Vec2<T>
The method for the <<
operator