Struct vec2d::Rect
[−]
[src]
pub struct Rect { // some fields omitted }
Rectangle defined by inclusive minimum and maximum coordinates
Methods
impl Rect
[src]
fn width(&self) -> usize
Calculate rectangle width
fn height(&self) -> usize
Calculate rectangle height
fn size(&self) -> Size
Calculate rectangle size
impl Rect
[src]
fn new(min_coord: Coord, max_coord: Coord) -> Option<Rect>
Create a new Rect defined by inclusive minimum and maximum coordinates. If min_coord is greater than max_coord on either axis then None is returned.
Trait Implementations
impl PartialEq for Rect
[src]
fn eq(&self, __arg_0: &Rect) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Rect) -> bool
This method tests for !=
.
impl Debug for Rect
[src]
impl Eq for Rect
[src]
impl Copy for Rect
[src]
impl Clone for Rect
[src]
fn clone(&self) -> Rect
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