Struct vec2d::Size
[−]
[src]
pub struct Size { pub width: usize, pub height: usize, }
Rectangle dimensions
Fields
width: usize
Width of rectangle
height: usize
Height of rectangle
Methods
impl Size
[src]
fn new(width: usize, height: usize) -> Size
Create a 2D size of (width, height)
fn area(&self) -> usize
width * height
fn contains_coord(&self, coord: Coord) -> bool
Return true if the coordinate fits within self's width and height, false otherwise.
Trait Implementations
impl PartialEq for Size
[src]
fn eq(&self, __arg_0: &Size) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Size) -> bool
This method tests for !=
.
impl Eq for Size
[src]
impl Debug for Size
[src]
impl Copy for Size
[src]
impl Clone for Size
[src]
fn clone(&self) -> Size
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