pub struct Circle<N: Num = f32>(pub Point<N>, pub N);Tuple Fields§
§0: Point<N>§1: NImplementations§
Source§impl<N: Num> Circle<N>
impl<N: Num> Circle<N>
pub fn new_zero_value() -> Self
pub fn with_radius(centre_point: Point<N>, radius: N) -> Self
pub fn with_diameter(centre_point: Point<N>, diameter: N) -> Self
pub fn move_xy(&mut self, xy: Point<N>)
pub fn move_x(&mut self, x: N)
pub fn move_y(&mut self, y: N)
pub fn width(&self) -> N
pub fn height(&self) -> N
pub fn radius(&self) -> N
pub fn radius_sqrd(&self) -> N
pub fn to_size(&self) -> Size<N>
pub fn centre(&self) -> Point<N>
pub fn mult_radius(&mut self, n: N)
pub fn div_radius(&mut self, n: N)
pub fn add_radius(&mut self, n: N)
pub fn sub_radius(&mut self, n: N)
pub fn abs(&self) -> Self
pub fn min(self, other: Self) -> Self
pub fn max(self, other: Self) -> Self
pub fn overlaps(&self, other: Self) -> bool
pub fn contains_point(&self, point: Point<N>) -> bool
pub fn iter_circumference_points( self, num_points: usize, ) -> CircleCircumferencePointsIterator ⓘ
pub fn iter_circumference_lines( self, num_lines: usize, ) -> CircleCircumferenceLinesIterator ⓘ
pub fn rotate_around_zero(self, rotation: f32) -> Self
pub fn rotate_around_point(self, rotation: f32, point: Point<N>) -> Self
pub fn overlaps_line(self, other: Line<N>) -> bool
Trait Implementations§
Source§impl<N: Num> AddAssign<Point<N>> for Circle<N>
impl<N: Num> AddAssign<Point<N>> for Circle<N>
Source§fn add_assign(&mut self, other: Point<N>)
fn add_assign(&mut self, other: Point<N>)
Performs the
+= operation. Read moreSource§impl<N: Num> SubAssign<Point<N>> for Circle<N>
impl<N: Num> SubAssign<Point<N>> for Circle<N>
Source§fn sub_assign(&mut self, other: Point<N>)
fn sub_assign(&mut self, other: Point<N>)
Performs the
-= operation. Read moreSource§impl<O: Num, N: Num + ToRounded<O>> ToRounded<Circle<O>> for Circle<N>
impl<O: Num, N: Num + ToRounded<O>> ToRounded<Circle<O>> for Circle<N>
Source§fn to_rounded(self) -> Circle<O>
fn to_rounded(self) -> Circle<O>
Returns the value in the new type, but clamped.
impl<N: Copy + Num> Copy for Circle<N>
Auto Trait Implementations§
impl<N> Freeze for Circle<N>where
N: Freeze,
impl<N> RefUnwindSafe for Circle<N>where
N: RefUnwindSafe,
impl<N> Send for Circle<N>where
N: Send,
impl<N> Sync for Circle<N>where
N: Sync,
impl<N> Unpin for Circle<N>where
N: Unpin,
impl<N> UnwindSafe for Circle<N>where
N: UnwindSafe,
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