Struct aurum_linear::Rect
[−]
[src]
pub struct Rect<T> { /* fields omitted */ }
Rectangle.
Methods
impl<T> Rect<T>
[src]
fn area(self) -> T where
T: Sub<Output = T> + Mul<Output = T>,
T: Sub<Output = T> + Mul<Output = T>,
fn from_org_end(org: Vec2<T>, end: Vec2<T>) -> Rect<T> where
T: Clone + Sub<Output = T>,
T: Clone + Sub<Output = T>,
fn from_org_size(org: Vec2<T>, size: Vec2<T>) -> Rect<T> where
T: Clone + Add<Output = T>,
T: Clone + Add<Output = T>,
fn from_xywh(x: T, y: T, w: T, h: T) -> Rect<T> where
T: Clone + Add<Output = T>,
T: Clone + Add<Output = T>,
fn from_xyxy(ax: T, ay: T, bx: T, by: T) -> Rect<T> where
T: Clone + Sub<Output = T>,
T: Clone + Sub<Output = T>,
fn end(self) -> Vec2<T> where
T: Add<Output = T>,
T: Add<Output = T>,
fn end_x(self) -> T where
T: Add<Output = T>,
T: Add<Output = T>,
fn end_y(self) -> T where
T: Add<Output = T>,
T: Add<Output = T>,
fn height(self) -> T where
T: Sub<Output = T>,
T: Sub<Output = T>,
fn org(self) -> Vec2<T>
fn size(self) -> Vec2<T> where
T: Sub<Output = T>,
T: Sub<Output = T>,
fn width(self) -> T where
T: Sub<Output = T>,
T: Sub<Output = T>,
fn x(self) -> T
fn y(self) -> T
Trait Implementations
impl<T: Clone> Clone for Rect<T>
[src]
fn clone(&self) -> Rect<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 Rect<T>
[src]
impl<T: Debug> Debug for Rect<T>
[src]
impl<T: Default> Default for Rect<T>
[src]
impl<T: Eq> Eq for Rect<T>
[src]
impl<T: Hash> Hash for Rect<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 Rect<T>
[src]
fn eq(&self, __arg_0: &Rect<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Rect<T>) -> bool
This method tests for !=
.
impl<T: Copy + Add<Output = T>> Add<Vec2<T>> for Rect<T>
[src]
type Output = Rect<T>
The resulting type after applying the +
operator
fn add(self, rhs: Vec2<T>) -> Rect<T>
The method for the +
operator
impl<T: Copy + Div<Output = T>> Div<T> for Rect<T>
[src]
type Output = Rect<T>
The resulting type after applying the /
operator
fn div(self, rhs: T) -> Rect<T>
The method for the /
operator
impl<T: Copy + Div<Output = T>> Div<Vec2<T>> for Rect<T>
[src]
type Output = Rect<T>
The resulting type after applying the /
operator
fn div(self, rhs: Vec2<T>) -> Rect<T>
The method for the /
operator
impl<T: Copy + Mul<Output = T>> Mul<T> for Rect<T>
[src]
type Output = Rect<T>
The resulting type after applying the *
operator
fn mul(self, rhs: T) -> Rect<T>
The method for the *
operator
impl<T: Copy + Mul<Output = T>> Mul<Vec2<T>> for Rect<T>
[src]
type Output = Rect<T>
The resulting type after applying the *
operator
fn mul(self, rhs: Vec2<T>) -> Rect<T>
The method for the *
operator