Struct rs_math3d::primitives::Rect
source · #[repr(C)]pub struct Rect<T: Scalar> {
pub x: T,
pub y: T,
pub width: T,
pub height: T,
}
Expand description
Rect
Fields§
§x: T
§y: T
§width: T
§height: T
Implementations§
source§impl<T: Scalar> Rect<T>
impl<T: Scalar> Rect<T>
pub fn new(x: T, y: T, width: T, height: T) -> Self
pub fn from(min_vec: &Vector2<T>, max_vec: &Vector2<T>) -> Self
pub fn min(&self) -> Vector2<T>
pub fn max(&self) -> Vector2<T>
pub fn intersect(&self, other: &Self) -> Option<Self>
pub fn contains(&self, p: &Vector2<T>) -> bool
Trait Implementations§
impl<T: Copy + Scalar> Copy for Rect<T>
Auto Trait Implementations§
impl<T> Freeze for Rect<T>where
T: Freeze,
impl<T> RefUnwindSafe for Rect<T>where
T: RefUnwindSafe,
impl<T> Send for Rect<T>where
T: Send,
impl<T> Sync for Rect<T>where
T: Sync,
impl<T> Unpin for Rect<T>where
T: Unpin,
impl<T> UnwindSafe for Rect<T>where
T: UnwindSafe,
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