pub struct Circle {
pub center: Point2D,
pub radius: Positive,
}
Expand description
Circle, a circle in 2D space
Fields§
§center: Point2D
§radius: Positive
Trait Implementations§
Source§impl HasBoundingBox2D for Circle
impl HasBoundingBox2D for Circle
Source§fn bounding_box(&self) -> BoundingBox2D
fn bounding_box(&self) -> BoundingBox2D
Should return the bounding box if it can be calculated
Source§impl HasBoundingBox2DMaybe for Circle
impl HasBoundingBox2DMaybe for Circle
Source§fn bounding_box_maybe(&self) -> Result<BoundingBox2D>
fn bounding_box_maybe(&self) -> Result<BoundingBox2D>
Should return the bounding box if it can be calculated
Source§impl Is2D for Circle
impl Is2D for Circle
Source§fn abs(&self) -> NonNegative
fn abs(&self) -> NonNegative
The absolute / length of this position
Source§impl IsBuildable2D for Circle
impl IsBuildable2D for Circle
Source§impl IsBuildableND for Circle
impl IsBuildableND for Circle
Source§impl IsEditable2D for Circle
impl IsEditable2D for Circle
Source§fn increase_distance_to_by<P>(&mut self, other: &P, factor: Positive)where
P: Is2D,
fn increase_distance_to_by<P>(&mut self, other: &P, factor: Positive)where
P: Is2D,
Increases distance towards other by factor
Source§fn add<P>(&mut self, other: &P)where
P: Is2D,
fn add<P>(&mut self, other: &P)where
P: Is2D,
Adds the coordinates of other onto this. x = x + other.x …
Source§impl IsEditableND for Circle
impl IsEditableND for Circle
Source§impl IsND for Circle
impl IsND for Circle
Source§fn n_dimensions() -> usize
fn n_dimensions() -> usize
Should return the number of dimensions. E.g. 2 for points in 2D space, 3 for points in 3D space etc.
Source§impl IsScalable for Circle
impl IsScalable for Circle
Source§impl Ord for Circle
impl Ord for Circle
Source§impl PartialOrd for Circle
impl PartialOrd for Circle
impl Eq for Circle
impl StructuralPartialEq for Circle
Auto Trait Implementations§
impl Freeze for Circle
impl RefUnwindSafe for Circle
impl Send for Circle
impl Sync for Circle
impl Unpin for Circle
impl UnwindSafe for Circle
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 more