pub struct Rect2D {
pub origin: Double2D,
pub far_point: Double2D,
}
Fields§
§origin: Double2D
§far_point: Double2D
Implementations§
Source§impl Rect2D
impl Rect2D
pub const fn empty() -> Rect2D
pub fn new(origin: Double2D, size: Vec2D) -> Self
pub fn origin(&self) -> Double2D
pub fn size(&self) -> Vec2D
pub fn far_point(&self) -> Double2D
pub fn far_horiz(&self) -> Double2D
pub fn far_vert(&self) -> Double2D
pub fn corners(&self) -> [Double2D; 4]
pub fn contains(&self, point: Double2D) -> bool
pub fn intersects(&self, other: &Rect2D) -> bool
pub fn add_point(&mut self, x: f64, y: f64)
pub fn height(&self) -> f64
pub fn width(&self) -> f64
pub fn center(&self) -> Double2D
pub fn lower_left_quadrant(&self) -> Rect2D
pub fn upper_left_quadrant(&self) -> Rect2D
pub fn upper_right_quadrant(&self) -> Rect2D
pub fn lower_right_quadrant(&self) -> Rect2D
Trait Implementations§
Source§impl Ord for Rect2D
impl Ord for Rect2D
Source§impl PartialOrd for Rect2D
impl PartialOrd for Rect2D
impl Copy for Rect2D
impl Eq for Rect2D
impl StructuralPartialEq for Rect2D
Auto Trait Implementations§
impl Freeze for Rect2D
impl RefUnwindSafe for Rect2D
impl Send for Rect2D
impl Sync for Rect2D
impl Unpin for Rect2D
impl UnwindSafe for Rect2D
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more