Struct figures::SizedRect [−][src]
Fields
origin: Point<T, Unit>
The origin of the rectangle.
size: Size<T, Unit>
The size of the rectangle.
Implementations
Trait Implementations
The default tolerance to use when testing values that are close together. Read more
A test for equality that uses the absolute difference to compute the approximate equality of two numbers. Read more
The inverse of AbsDiffEq::abs_diff_eq
.
Returns true if the values are approximately equal. Uses
approx::AbsDiffEq
with the default epsilon. Read more
Returns this value after applying scale
, if needed.
Returns this value after applying scale
, if needed.
Returns this value after applying scale
, if needed.
Returns this value after applying scale
, if needed.
Returns this value after applying scale
, if needed.
Returns this value after applying scale
, if needed.
Returns this value after applying scale
, if needed.
Returns this value after applying scale
, if needed.
Returns this value after applying scale
, if needed.
Returns this rectangle as a Rect
. The rectangle’s underlying data will
be unchanged by this operation. Read more
Returns this rectangle converted to an ExtentsRect
.
Moves this rectangle by the vector provided.
Increases the size of this rectangle by the vector provided. The rectangle will grow around its center.
Checks to see if this rect is empty. If it is, None is returned. If it isn’t, the rect is returned unmodified. Read more
Returns true if point
is within this rectangle.
Returns the intersecting area between the two rectangles. If the rectangles do not intersect, None is returned. Read more
Returns the union of the two rectangles. If both rectangles aren’t empty, the smallest rectangle that both rectangles can fit into will be returned. If either rectangle is empty, the other rectangle is returned unmodified. Read more
impl<T, Unit> RelativeEq<SizedRect<T, Unit>> for SizedRect<T, Unit> where
T: RelativeEq<Epsilon = T> + Copy,
impl<T, Unit> RelativeEq<SizedRect<T, Unit>> for SizedRect<T, Unit> where
T: RelativeEq<Epsilon = T> + Copy,
The default relative tolerance for testing values that are far-apart. Read more
A test for equality that uses a relative comparison if the values are far apart.
The inverse of RelativeEq::relative_eq
.
The default ULPs to tolerate when testing values that are far-apart. Read more
A test for equality that uses units in the last place (ULP) if the values are far apart.
Auto Trait Implementations
impl<T, Unit> RefUnwindSafe for SizedRect<T, Unit> where
T: RefUnwindSafe,
Unit: RefUnwindSafe,
impl<T, Unit> UnwindSafe for SizedRect<T, Unit> where
T: UnwindSafe,
Unit: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more