Struct rinmath::Rect [−][src]
Fields
pos: Pnt2<T>
width: T
height: T
Methods
impl<T: Float + BaseNum> Rect<T>
[src]
impl<T: Float + BaseNum> Rect<T>
pub fn aspect_ratio(&self) -> T
[src]
pub fn aspect_ratio(&self) -> T
pub fn min_x(&self) -> T
[src]
pub fn min_x(&self) -> T
pub fn max_x(&self) -> T
[src]
pub fn max_x(&self) -> T
pub fn min_y(&self) -> T
[src]
pub fn min_y(&self) -> T
pub fn max_y(&self) -> T
[src]
pub fn max_y(&self) -> T
impl<T: BaseNum> Rect<T>
[src]
impl<T: BaseNum> Rect<T>
pub fn top_left(&self) -> Pnt2<T>
[src]
pub fn top_left(&self) -> Pnt2<T>
pub fn top_right(&self) -> Pnt2<T>
[src]
pub fn top_right(&self) -> Pnt2<T>
pub fn bottom_left(&self) -> Pnt2<T>
[src]
pub fn bottom_left(&self) -> Pnt2<T>
pub fn bottom_right(&self) -> Pnt2<T>
[src]
pub fn bottom_right(&self) -> Pnt2<T>
pub fn center(&self) -> Pnt2<T> where
i32: SubsetOf<T>,
[src]
pub fn center(&self) -> Pnt2<T> where
i32: SubsetOf<T>,
Trait Implementations
impl<T: Clone + BaseNum> Clone for Rect<T>
[src]
impl<T: Clone + BaseNum> Clone for Rect<T>
fn clone(&self) -> 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[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl<T: Copy + BaseNum> Copy for Rect<T>
[src]
impl<T: Copy + BaseNum> Copy for Rect<T>
impl<T: Debug + BaseNum> Debug for Rect<T>
[src]
impl<T: Debug + BaseNum> Debug for Rect<T>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T: PartialEq + BaseNum> PartialEq for Rect<T>
[src]
impl<T: PartialEq + BaseNum> PartialEq for Rect<T>
fn eq(&self, other: &Rect<T>) -> bool
[src]
fn eq(&self, other: &Rect<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rect<T>) -> bool
[src]
fn ne(&self, other: &Rect<T>) -> bool
This method tests for !=
.
impl<N1: BaseNum, N2: BaseNum + SupersetOf<N1>> SubsetOf<Rect<N2>> for Rect<N1> where
Pnt2<N2>: SupersetOf<Pnt2<N1>>,
[src]
impl<N1: BaseNum, N2: BaseNum + SupersetOf<N1>> SubsetOf<Rect<N2>> for Rect<N1> where
Pnt2<N2>: SupersetOf<Pnt2<N1>>,
fn is_in_subset(t: &Rect<N2>) -> bool
[src]
fn is_in_subset(t: &Rect<N2>) -> bool
Checks if element
is actually part of the subset Self
(and can be converted to it).
unsafe fn from_superset_unchecked(t: &Rect<N2>) -> Rect<N1>
[src]
unsafe fn from_superset_unchecked(t: &Rect<N2>) -> Rect<N1>
Use with care! Same as self.to_superset
but without any property checks. Always succeeds.
fn to_superset(&self) -> Rect<N2>
[src]
fn to_superset(&self) -> Rect<N2>
The inclusion map: converts self
to the equivalent element of its superset.
fn from_superset(element: &T) -> Option<Self>
[src]
fn from_superset(element: &T) -> Option<Self>
The inverse inclusion map: attempts to construct self
from the equivalent element of its superset. Read more