Struct dvec::Rect2
[−]
[src]
#[repr(C)]pub struct Rect2<T>(pub Vec2<T>, pub Vec2<T>);
Axis-aligned rectangle type.
Methods
impl<T> Rect2<T>
[src]
fn contains(&self, pt: Vec2<T>) -> bool where
T: Ord,
T: Ord,
fn height(&self) -> T where
&'a T: Sub<Output = T>,
&'a T: Sub<Output = T>,
fn intersect(self, rhs: Rect2<T>) -> Rect2<T> where
T: Ord,
T: Ord,
fn is_good(&self) -> bool where
T: Ord,
T: Ord,
fn raw_conv<U>(self) -> Rect2<U> where
T: RawInto<U>,
T: RawInto<U>,
fn size(&self) -> Vec2<T> where
&'a T: Sub<Output = T>,
&'a T: Sub<Output = T>,
fn to_size(self) -> Vec2<T> where
T: Sub<Output = T>,
T: Sub<Output = T>,
fn try_intersect(self, rhs: Rect2<T>) -> Option<Rect2<T>> where
T: Ord,
T: Ord,
fn width(&self) -> T where
&'a T: Sub<Output = T>,
&'a T: Sub<Output = T>,
fn x0y1(self) -> Vec2<T>
fn x1y0(self) -> Vec2<T>
Trait Implementations
impl<T: Clone> Clone for Rect2<T>
[src]
fn clone(&self) -> Rect2<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 Rect2<T>
[src]
impl<T: Debug> Debug for Rect2<T>
[src]
impl<T: Default> Default for Rect2<T>
[src]
impl<T: Eq> Eq for Rect2<T>
[src]
impl<T: Hash> Hash for Rect2<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 Rect2<T>
[src]
fn eq(&self, __arg_0: &Rect2<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Rect2<T>) -> bool
This method tests for !=
.
impl<T> Mul<T> for Rect2<T> where
T: Copy + Mul<Output = T>,
[src]
T: Copy + Mul<Output = T>,
type Output = Rect2<T>
The resulting type after applying the *
operator
fn mul(self, rhs: T) -> Rect2<T>
The method for the *
operator
impl<'a, T> Mul<&'a T> for Rect2<T> where
T: Mul<&'a T, Output = T>,
[src]
T: Mul<&'a T, Output = T>,
type Output = Rect2<T>
The resulting type after applying the *
operator
fn mul(self, rhs: &'a T) -> Rect2<T>
The method for the *
operator
impl<'a, T> Mul<T> for &'a Rect2<T> where
T: Copy,
&'a T: Mul<T, Output = T>,
[src]
T: Copy,
&'a T: Mul<T, Output = T>,
type Output = Rect2<T>
The resulting type after applying the *
operator
fn mul(self, rhs: T) -> Rect2<T>
The method for the *
operator
impl<'a, 'b, T> Mul<&'b T> for &'a Rect2<T> where
&'a T: Mul<&'b T, Output = T>,
[src]
&'a T: Mul<&'b T, Output = T>,
type Output = Rect2<T>
The resulting type after applying the *
operator
fn mul(self, rhs: &'b T) -> Rect2<T>
The method for the *
operator
impl<T> Div<T> for Rect2<T> where
T: Copy + Div<Output = T>,
[src]
T: Copy + Div<Output = T>,
type Output = Rect2<T>
The resulting type after applying the /
operator
fn div(self, rhs: T) -> Rect2<T>
The method for the /
operator
impl<'a, T> Div<&'a T> for Rect2<T> where
T: Div<&'a T, Output = T>,
[src]
T: Div<&'a T, Output = T>,
type Output = Rect2<T>
The resulting type after applying the /
operator
fn div(self, rhs: &'a T) -> Rect2<T>
The method for the /
operator
impl<'a, T> Div<T> for &'a Rect2<T> where
T: Copy,
&'a T: Div<T, Output = T>,
[src]
T: Copy,
&'a T: Div<T, Output = T>,
type Output = Rect2<T>
The resulting type after applying the /
operator
fn div(self, rhs: T) -> Rect2<T>
The method for the /
operator
impl<'a, 'b, T> Div<&'b T> for &'a Rect2<T> where
&'a T: Div<&'b T, Output = T>,
[src]
&'a T: Div<&'b T, Output = T>,
type Output = Rect2<T>
The resulting type after applying the /
operator
fn div(self, rhs: &'b T) -> Rect2<T>
The method for the /
operator
impl<T> MulAssign<T> for Rect2<T> where
T: Copy + MulAssign,
[src]
T: Copy + MulAssign,
fn mul_assign(&mut self, rhs: T)
The method for the *=
operator
impl<'a, T> MulAssign<&'a T> for Rect2<T> where
T: MulAssign<&'a T>,
[src]
T: MulAssign<&'a T>,
fn mul_assign(&mut self, rhs: &'a T)
The method for the *=
operator
impl<T> DivAssign<T> for Rect2<T> where
T: Copy + DivAssign,
[src]
T: Copy + DivAssign,
fn div_assign(&mut self, rhs: T)
The method for the /=
operator
impl<'a, T> DivAssign<&'a T> for Rect2<T> where
T: DivAssign<&'a T>,
[src]
T: DivAssign<&'a T>,
fn div_assign(&mut self, rhs: &'a T)
The method for the /=
operator
impl<T> Add<Vec2<T>> for Rect2<T> where
T: Copy + Add<Output = T>,
[src]
T: Copy + Add<Output = T>,
type Output = Rect2<T>
The resulting type after applying the +
operator
fn add(self, rhs: Vec2<T>) -> Rect2<T>
The method for the +
operator
impl<'a, T> Add<&'a Vec2<T>> for Rect2<T> where
T: Add<&'a T, Output = T>,
[src]
T: Add<&'a T, Output = T>,
type Output = Rect2<T>
The resulting type after applying the +
operator
fn add(self, rhs: &'a Vec2<T>) -> Rect2<T>
The method for the +
operator
impl<'a, T> Add<Vec2<T>> for &'a Rect2<T> where
T: Copy,
&'a T: Add<T, Output = T>,
[src]
T: Copy,
&'a T: Add<T, Output = T>,
type Output = Rect2<T>
The resulting type after applying the +
operator
fn add(self, rhs: Vec2<T>) -> Rect2<T>
The method for the +
operator
impl<'a, 'b, T> Add<&'b Vec2<T>> for &'a Rect2<T> where
&'a T: Add<&'b T, Output = T>,
[src]
&'a T: Add<&'b T, Output = T>,
type Output = Rect2<T>
The resulting type after applying the +
operator
fn add(self, rhs: &'b Vec2<T>) -> Rect2<T>
The method for the +
operator
impl<T> Sub<Vec2<T>> for Rect2<T> where
T: Copy + Sub<Output = T>,
[src]
T: Copy + Sub<Output = T>,
type Output = Rect2<T>
The resulting type after applying the -
operator
fn sub(self, rhs: Vec2<T>) -> Rect2<T>
The method for the -
operator
impl<'a, T> Sub<&'a Vec2<T>> for Rect2<T> where
T: Sub<&'a T, Output = T>,
[src]
T: Sub<&'a T, Output = T>,
type Output = Rect2<T>
The resulting type after applying the -
operator
fn sub(self, rhs: &'a Vec2<T>) -> Rect2<T>
The method for the -
operator
impl<'a, T> Sub<Vec2<T>> for &'a Rect2<T> where
T: Copy,
&'a T: Sub<T, Output = T>,
[src]
T: Copy,
&'a T: Sub<T, Output = T>,
type Output = Rect2<T>
The resulting type after applying the -
operator
fn sub(self, rhs: Vec2<T>) -> Rect2<T>
The method for the -
operator
impl<'a, 'b, T> Sub<&'b Vec2<T>> for &'a Rect2<T> where
&'a T: Sub<&'b T, Output = T>,
[src]
&'a T: Sub<&'b T, Output = T>,
type Output = Rect2<T>
The resulting type after applying the -
operator
fn sub(self, rhs: &'b Vec2<T>) -> Rect2<T>
The method for the -
operator
impl<T> Mul<Vec2<T>> for Rect2<T> where
T: Copy + Mul<Output = T>,
[src]
T: Copy + Mul<Output = T>,
type Output = Rect2<T>
The resulting type after applying the *
operator
fn mul(self, rhs: Vec2<T>) -> Rect2<T>
The method for the *
operator
impl<'a, T> Mul<&'a Vec2<T>> for Rect2<T> where
T: Mul<&'a T, Output = T>,
[src]
T: Mul<&'a T, Output = T>,
type Output = Rect2<T>
The resulting type after applying the *
operator
fn mul(self, rhs: &'a Vec2<T>) -> Rect2<T>
The method for the *
operator
impl<'a, T> Mul<Vec2<T>> for &'a Rect2<T> where
T: Copy,
&'a T: Mul<T, Output = T>,
[src]
T: Copy,
&'a T: Mul<T, Output = T>,
type Output = Rect2<T>
The resulting type after applying the *
operator
fn mul(self, rhs: Vec2<T>) -> Rect2<T>
The method for the *
operator
impl<'a, 'b, T> Mul<&'b Vec2<T>> for &'a Rect2<T> where
&'a T: Mul<&'b T, Output = T>,
[src]
&'a T: Mul<&'b T, Output = T>,
type Output = Rect2<T>
The resulting type after applying the *
operator
fn mul(self, rhs: &'b Vec2<T>) -> Rect2<T>
The method for the *
operator
impl<T> Div<Vec2<T>> for Rect2<T> where
T: Copy + Div<Output = T>,
[src]
T: Copy + Div<Output = T>,
type Output = Rect2<T>
The resulting type after applying the /
operator
fn div(self, rhs: Vec2<T>) -> Rect2<T>
The method for the /
operator
impl<'a, T> Div<&'a Vec2<T>> for Rect2<T> where
T: Div<&'a T, Output = T>,
[src]
T: Div<&'a T, Output = T>,
type Output = Rect2<T>
The resulting type after applying the /
operator
fn div(self, rhs: &'a Vec2<T>) -> Rect2<T>
The method for the /
operator
impl<'a, T> Div<Vec2<T>> for &'a Rect2<T> where
T: Copy,
&'a T: Div<T, Output = T>,
[src]
T: Copy,
&'a T: Div<T, Output = T>,
type Output = Rect2<T>
The resulting type after applying the /
operator
fn div(self, rhs: Vec2<T>) -> Rect2<T>
The method for the /
operator
impl<'a, 'b, T> Div<&'b Vec2<T>> for &'a Rect2<T> where
&'a T: Div<&'b T, Output = T>,
[src]
&'a T: Div<&'b T, Output = T>,
type Output = Rect2<T>
The resulting type after applying the /
operator
fn div(self, rhs: &'b Vec2<T>) -> Rect2<T>
The method for the /
operator
impl<T> AddAssign<Vec2<T>> for Rect2<T> where
T: Copy,
Vec2<T>: AddAssign,
[src]
T: Copy,
Vec2<T>: AddAssign,
fn add_assign(&mut self, rhs: Vec2<T>)
The method for the +=
operator
impl<'a, T> AddAssign<&'a Vec2<T>> for Rect2<T> where
Vec2<T>: AddAssign<&'a Vec2<T>>,
[src]
Vec2<T>: AddAssign<&'a Vec2<T>>,
fn add_assign(&mut self, rhs: &'a Vec2<T>)
The method for the +=
operator
impl<T> SubAssign<Vec2<T>> for Rect2<T> where
T: Copy,
Vec2<T>: SubAssign,
[src]
T: Copy,
Vec2<T>: SubAssign,
fn sub_assign(&mut self, rhs: Vec2<T>)
The method for the -=
operator
impl<'a, T> SubAssign<&'a Vec2<T>> for Rect2<T> where
Vec2<T>: SubAssign<&'a Vec2<T>>,
[src]
Vec2<T>: SubAssign<&'a Vec2<T>>,
fn sub_assign(&mut self, rhs: &'a Vec2<T>)
The method for the -=
operator
impl<T> MulAssign<Vec2<T>> for Rect2<T> where
T: Copy,
Vec2<T>: MulAssign,
[src]
T: Copy,
Vec2<T>: MulAssign,
fn mul_assign(&mut self, rhs: Vec2<T>)
The method for the *=
operator
impl<'a, T> MulAssign<&'a Vec2<T>> for Rect2<T> where
Vec2<T>: MulAssign<&'a Vec2<T>>,
[src]
Vec2<T>: MulAssign<&'a Vec2<T>>,
fn mul_assign(&mut self, rhs: &'a Vec2<T>)
The method for the *=
operator
impl<T> DivAssign<Vec2<T>> for Rect2<T> where
T: Copy,
Vec2<T>: DivAssign,
[src]
T: Copy,
Vec2<T>: DivAssign,
fn div_assign(&mut self, rhs: Vec2<T>)
The method for the /=
operator
impl<'a, T> DivAssign<&'a Vec2<T>> for Rect2<T> where
Vec2<T>: DivAssign<&'a Vec2<T>>,
[src]
Vec2<T>: DivAssign<&'a Vec2<T>>,
fn div_assign(&mut self, rhs: &'a Vec2<T>)
The method for the /=
operator
impl<T> Neg for Rect2<T> where
T: Neg<Output = T>,
[src]
T: Neg<Output = T>,
type Output = Rect2<T>
The resulting type after applying the -
operator
fn neg(self) -> Rect2<T>
The method for the unary -
operator
impl<'a, T> Neg for &'a Rect2<T> where
&'a T: Neg<Output = T>,
[src]
&'a T: Neg<Output = T>,