Struct vodk_math::vec2::Rectangle
[−]
[src]
pub struct Rectangle<Unit = Untyped> { pub x: f32, pub y: f32, pub width: f32, pub height: f32, // some fields omitted }
Fields
x: f32
y: f32
width: f32
height: f32
Methods
impl<U> Rectangle<U>
[src]
fn new(x: f32, y: f32, w: f32, h: f32) -> Rectangle<U>
fn origin(&self) -> Vector2D<U>
fn size(&self) -> Size2D<U>
fn move_by(&mut self, v: Vector2D<U>)
fn scale_by(&mut self, v: f32)
fn top_left(&self) -> Vector2D<U>
fn top_right(&self) -> Vector2D<U>
fn bottom_right(&self) -> Vector2D<U>
fn bottom_left(&self) -> Vector2D<U>
fn x_most(&self) -> f32
fn y_most(&self) -> f32
fn contains(&self, other: &Rectangle<U>) -> bool
fn intersects(&self, other: &Rectangle<U>) -> bool
fn inflate(&mut self, d: f32)
fn deflate(&mut self, d: f32)
fn ensure_invariant(&mut self)
Trait Implementations
impl<U> Default for Rectangle<U>
[src]
impl<U: Unit> Debug for Rectangle<U>
[src]
impl<U> Copy for Rectangle<U>
[src]
impl<U> Clone for Rectangle<U>
[src]
fn clone(&self) -> Rectangle<U>
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