pub struct PolygonDynamic {
pub radius: f64,
pub points: usize,
}Fields§
§radius: f64§points: usizeImplementations§
Source§impl PolygonDynamic
impl PolygonDynamic
pub fn new(radius: f64, points: usize) -> Self
pub fn apothem(&self) -> f64
pub fn radius(&self) -> f64
pub fn points(&self) -> Map<Range<usize>, impl FnMut(usize) -> DVec2>
pub fn sides( &self, ) -> Map<CircularTupleWindows<IntoIter<DVec2>, (DVec2, DVec2)>, impl FnMut((DVec2, DVec2)) -> [DVec2; 2]>
Trait Implementations§
Source§impl Clone for PolygonDynamic
impl Clone for PolygonDynamic
Source§fn clone(&self) -> PolygonDynamic
fn clone(&self) -> PolygonDynamic
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PolygonDynamic
impl Debug for PolygonDynamic
Source§impl<'de> Deserialize<'de> for PolygonDynamic
impl<'de> Deserialize<'de> for PolygonDynamic
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 Object for PolygonDynamic
Available on crate feature std only.
impl Object for PolygonDynamic
Available on crate feature
std only.Source§impl PartialEq for PolygonDynamic
impl PartialEq for PolygonDynamic
Source§fn eq(&self, other: &PolygonDynamic) -> bool
fn eq(&self, other: &PolygonDynamic) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PolygonDynamic
impl Serialize for PolygonDynamic
Source§impl<const N: usize> TryFrom<PolygonDynamic> for Polygon<N>
Available on crate feature std only.
impl<const N: usize> TryFrom<PolygonDynamic> for Polygon<N>
Available on crate feature
std only.impl Copy for PolygonDynamic
impl StructuralPartialEq for PolygonDynamic
impl TwoDimensional for PolygonDynamic
Available on crate feature
std only.Auto Trait Implementations§
impl Freeze for PolygonDynamic
impl RefUnwindSafe for PolygonDynamic
impl Send for PolygonDynamic
impl Sync for PolygonDynamic
impl Unpin for PolygonDynamic
impl UnsafeUnpin for PolygonDynamic
impl UnwindSafe for PolygonDynamic
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