Struct lin::vector::Vector2
[−]
[src]
pub struct Vector2<N> where
N: Numeric,
N: Copy, {
pub x: N,
pub y: N,
}
A 2D vector of any numeric type.
This is the non-SIMD version.
Fields
x: N
y: N
Trait Implementations
impl<N: Clone> Clone for Vector2<N> where
N: Numeric,
N: Copy,
[src]
N: Numeric,
N: Copy,
fn clone(&self) -> Vector2<N>
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<N: Copy> Copy for Vector2<N> where
N: Numeric,
N: Copy,
[src]
N: Numeric,
N: Copy,
impl<N: PartialEq> PartialEq for Vector2<N> where
N: Numeric,
N: Copy,
[src]
N: Numeric,
N: Copy,
fn eq(&self, __arg_0: &Vector2<N>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Vector2<N>) -> bool
This method tests for !=
.
impl<N: PartialOrd> PartialOrd for Vector2<N> where
N: Numeric,
N: Copy,
[src]
N: Numeric,
N: Copy,
fn partial_cmp(&self, __arg_0: &Vector2<N>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Vector2<N>) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Vector2<N>) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Vector2<N>) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Vector2<N>) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl<N: Debug> Debug for Vector2<N> where
N: Numeric,
N: Copy,
[src]
N: Numeric,
N: Copy,
impl<N> Add<Vector2<N>> for Vector2<N> where
N: Numeric + Add<Output = N>,
N: Copy,
[src]
N: Numeric + Add<Output = N>,
N: Copy,
type Output = Vector2<N>
The resulting type after applying the +
operator
fn add(self, rhs: Self) -> Vector2<N>
The method for the +
operator
impl<N> Add<N> for Vector2<N> where
N: Numeric + Add<Output = N>,
N: Copy,
[src]
N: Numeric + Add<Output = N>,
N: Copy,
type Output = Vector2<N>
The resulting type after applying the +
operator
fn add(self, rhs: N) -> Vector2<N>
The method for the +
operator
impl<N> Sub<Vector2<N>> for Vector2<N> where
N: Numeric + Sub<Output = N>,
N: Copy,
[src]
N: Numeric + Sub<Output = N>,
N: Copy,
type Output = Vector2<N>
The resulting type after applying the -
operator
fn sub(self, rhs: Self) -> Vector2<N>
The method for the -
operator
impl<N> Sub<N> for Vector2<N> where
N: Numeric + Sub<Output = N>,
N: Copy,
[src]
N: Numeric + Sub<Output = N>,
N: Copy,
type Output = Vector2<N>
The resulting type after applying the -
operator
fn sub(self, rhs: N) -> Vector2<N>
The method for the -
operator
impl<N> Div<Vector2<N>> for Vector2<N> where
N: Numeric + Div<Output = N>,
N: Copy,
[src]
N: Numeric + Div<Output = N>,
N: Copy,
type Output = Vector2<N>
The resulting type after applying the /
operator
fn div(self, rhs: Self) -> Vector2<N>
The method for the /
operator
impl<N> Div<N> for Vector2<N> where
N: Numeric + Div<Output = N>,
N: Copy,
[src]
N: Numeric + Div<Output = N>,
N: Copy,
type Output = Vector2<N>
The resulting type after applying the /
operator
fn div(self, rhs: N) -> Vector2<N>
The method for the /
operator
impl<N> Mul<Vector2<N>> for Vector2<N> where
N: Numeric + Mul<Output = N>,
N: Copy,
[src]
N: Numeric + Mul<Output = N>,
N: Copy,
type Output = Vector2<N>
The resulting type after applying the *
operator
fn mul(self, rhs: Self) -> Vector2<N>
The method for the *
operator
impl<N> Mul<N> for Vector2<N> where
N: Numeric + Mul<Output = N>,
N: Copy,
[src]
N: Numeric + Mul<Output = N>,
N: Copy,
type Output = Vector2<N>
The resulting type after applying the *
operator
fn mul(self, rhs: N) -> Vector2<N>
The method for the *
operator
impl<N> Rem<Vector2<N>> for Vector2<N> where
N: Numeric + Rem<Output = N>,
N: Copy,
[src]
N: Numeric + Rem<Output = N>,
N: Copy,
type Output = Vector2<N>
The resulting type after applying the %
operator
fn rem(self, rhs: Self) -> Vector2<N>
The method for the %
operator
impl<N> Rem<N> for Vector2<N> where
N: Numeric + Rem<Output = N>,
N: Copy,
[src]
N: Numeric + Rem<Output = N>,
N: Copy,