Struct shape_core::Circle
source · [−]pub struct Circle<T> {
pub center: Point<T>,
pub radius: T,
}
Expand description
A circle defined by center and radius.
Fields
center: Point<T>
The center point of the circle.
radius: T
The radius of the circle.
Implementations
sourceimpl<T> Circle<T> where
T: Real + Clone,
impl<T> Circle<T> where
T: Real + Clone,
sourcepub fn from_2_points(p1: Point<T>, p2: Point<T>) -> Self
pub fn from_2_points(p1: Point<T>, p2: Point<T>) -> Self
Create circle from two points on the diameter.
sourcepub fn from_3_points(p1: Point<T>, p2: Point<T>, p3: Point<T>) -> Self
pub fn from_3_points(p1: Point<T>, p2: Point<T>, p3: Point<T>) -> Self
Create circle that intersects the 3 points.
Trait Implementations
sourceimpl<'de, T> Deserialize<'de> for Circle<T> where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Circle<T> where
T: Deserialize<'de>,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<T: Copy> Copy for Circle<T>
impl<T: Eq> Eq for Circle<T>
impl<T> StructuralEq for Circle<T>
impl<T> StructuralPartialEq for Circle<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Circle<T> where
T: RefUnwindSafe,
impl<T> Send for Circle<T> where
T: Send,
impl<T> Sync for Circle<T> where
T: Sync,
impl<T> Unpin for Circle<T> where
T: Unpin,
impl<T> UnwindSafe for Circle<T> where
T: 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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more