pub struct Circle {
pub radius: f64,
pub fa: f64,
pub fs: f64,
pub fn_: usize,
}Expand description
Creates a circle at origin
Fields§
§radius: f64Circle radius
fa: f64minimum angle (in degrees) of each fragment
fs: f64minimum circumferential length of each fragment
fn_: usizefixed number of fragments in 360 degrees. Values of 3 or more override $fa and $fs
Implementations§
Source§impl Circle
impl Circle
pub fn new<T: Number>(radius: T, fa: T, fs: T, fn: usize) -> Self
pub fn with_diameter<T: Number>(self, radius: T) -> Self
pub fn with_radius<T: Number>(self, radius: T) -> Self
pub fn with_fa<T: Number>(self, fa: T) -> Self
pub fn with_fs<T: Number>(self, fs: T) -> Self
pub fn with_fn(self, fn: usize) -> Self
pub const fn center(&self) -> DVec2
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Circle
impl<'de> Deserialize<'de> for Circle
Source§fn 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
Source§impl ToDynamic for Circle
impl ToDynamic for Circle
fn to_dynamic(&self) -> DynamicObject
impl Copy for Circle
impl TwoDimensional 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 UnsafeUnpin 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> CenterObject for Twhere
T: Object,
impl<T> CenterObject for Twhere
T: Object,
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ColorObject for Twhere
T: Object,
impl<T> ColorObject for Twhere
T: Object,
fn colored(self, color: impl ColorFormat) -> Colored<T>
Source§impl<T> DifferenceObject for Twhere
T: Object,
impl<T> DifferenceObject for Twhere
T: Object,
fn difference<Other: Object>(self, other: Other) -> Difference<Self, Other>
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> IntersectionObject for Twhere
T: Object,
impl<T> IntersectionObject for Twhere
T: Object,
fn intersection<Other: Object>(self, other: Other) -> Intersection<Self, Other>
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