[−][src]Struct tiny_rpg::math::Rectangle
Methods
impl Rectangle
[src]
pub fn new(x: i32, y: i32, width: u32, height: u32) -> Rectangle
[src]
pub fn get_point(&self) -> Point
[src]
pub fn get_dimension(&self) -> Dimension
[src]
pub fn move_x(&mut self, amount_x: i32)
[src]
pub fn move_y(&mut self, amount_y: i32)
[src]
pub fn move_xy(&mut self, amount: Point)
[src]
pub fn x(&self) -> i32
[src]
pub fn y(&self) -> i32
[src]
pub fn width(&self) -> u32
[src]
pub fn height(&self) -> u32
[src]
pub fn is_colliding(&self, other_rectangle: Rectangle) -> bool
[src]
pub fn is_not_colliding(&self, other_rectangle: Rectangle) -> bool
[src]
pub fn y_max(&self) -> i32
[src]
pub fn x_max(&self) -> i32
[src]
pub fn y_min(&self) -> i32
[src]
pub fn x_min(&self) -> i32
[src]
Trait Implementations
impl Clone for Rectangle
[src]
fn clone(&self) -> Rectangle
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq<Rectangle> for Rectangle
[src]
impl Copy for Rectangle
[src]
impl Eq for Rectangle
[src]
impl Debug for Rectangle
[src]
Auto Trait Implementations
impl Unpin for Rectangle
impl Sync for Rectangle
impl Send for Rectangle
impl UnwindSafe for Rectangle
impl RefUnwindSafe for Rectangle
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,