pub struct Rect<N: Num + NumCast + Copy + PartialOrd> {
pub x: N,
pub y: N,
pub w: N,
pub h: N,
}
Fields
x: N
y: N
w: N
h: N
Implementations
sourceimpl<N: Num + NumCast + Copy + PartialOrd> Rect<N>
impl<N: Num + NumCast + Copy + PartialOrd> Rect<N>
pub fn test(&self, pos_x: N, pos_y: N) -> bool
pub fn adjusted_by(&self, dx: N, dy: N, dw: N, dh: N) -> Rect<N>
pub fn retracted_by(&self, retract_x: N, retract_y: N) -> Rect<N>
pub fn expanded_by(&self, expand_x: N, expand_y: N) -> Rect<N>
pub fn position(&self) -> Point2<N>
pub fn size(&self) -> Vector2<N>
Trait Implementations
impl<N: Copy + Num + NumCast + Copy + PartialOrd> Copy for Rect<N>
Auto Trait Implementations
impl<N> RefUnwindSafe for Rect<N> where
N: RefUnwindSafe,
impl<N> Send for Rect<N> where
N: Send,
impl<N> Sync for Rect<N> where
N: Sync,
impl<N> Unpin for Rect<N> where
N: Unpin,
impl<N> UnwindSafe for Rect<N> where
N: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more