[−][src]Struct polys::circle::Circle
Struct that represents a circle.
Fields
radius: f64
Implementations
impl Circle
[src]
Trait Implementations
impl Debug for Circle
[src]
impl Polygon for Circle
[src]
fn area(&self) -> f64
[src]
Gets the area of the Circle from its radius.
Examples
use crate::polys::Polygon; let circle = polys::Circle::new(5.0); let area = circle.area(); assert_eq!(area, (std::f64::consts::PI * 25f64) as f64);
fn peri(&self) -> f64
[src]
Gets the circumferance of the Circle from its radius.
Examples
use crate::polys::Polygon; use core::f64::consts::PI; let circle = polys::Circle::new(5.0); let peri = circle.peri(); assert_eq!(peri, 10f64*PI);
fn angles(&self) -> Vec<f64>
[src]
Returns an empty vector.
Examples
use crate::polys::Polygon; let circle = polys::Circle::new(5.0); let angles = circle.angles(); assert!(angles.is_empty());
Auto Trait Implementations
impl RefUnwindSafe for Circle
impl Send for Circle
impl Sync for Circle
impl Unpin for Circle
impl UnwindSafe for Circle
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,