pub struct Bounds2<T> {
pub min: Vector2<T>,
pub max: Vector2<T>,
}
Fields§
§min: Vector2<T>
§max: Vector2<T>
Implementations§
Source§impl<T: Copy + PartialOrd> Bounds2<T>
impl<T: Copy + PartialOrd> Bounds2<T>
Source§impl<T: Copy + PartialOrd + Add<Output = T> + Sub<Output = T> + Mul<Output = T> + Div<Output = T>> Bounds2<T>
impl<T: Copy + PartialOrd + Add<Output = T> + Sub<Output = T> + Mul<Output = T> + Div<Output = T>> Bounds2<T>
pub fn area(&self) -> T
pub fn diagonal(&self) -> Vector2<T>
pub fn offset(&self, p: &Vector2<T>) -> Vector2<T>
pub fn expand(&self, delta: T) -> Self
pub fn union(&self, other: &Self) -> Self
pub fn intersect(&self, other: &Self) -> Self
pub fn union_p(&self, other: &Vector2<T>) -> Self
pub fn inside(&self, p: &Vector2<T>) -> bool
pub fn inside_exclusive(&self, p: &Vector2<T>) -> bool
Trait Implementations§
impl<T: Copy> Copy for Bounds2<T>
impl<T> StructuralPartialEq for Bounds2<T>
Auto Trait Implementations§
impl<T> Freeze for Bounds2<T>where
T: Freeze,
impl<T> RefUnwindSafe for Bounds2<T>where
T: RefUnwindSafe,
impl<T> Send for Bounds2<T>where
T: Send,
impl<T> Sync for Bounds2<T>where
T: Sync,
impl<T> Unpin for Bounds2<T>where
T: Unpin,
impl<T> UnwindSafe for Bounds2<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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.