Struct rsgeo::prelude::CircleArea [−][src]
pub struct CircleArea { /* fields omitted */ }
CircleArea is a circle area which has a center point of circle and a radius
Example
use rsgeo::prelude::*; let ca = CircleArea::new(Point::new(25.2,120.5).unwrap(),30_000.0); // create a circle which coc is (25.2,120.5) and radius is 30km
Implementations
impl CircleArea
[src]
Trait Implementations
impl Area for CircleArea
[src]
fn contains(&self, p: &Point) -> bool
[src]
Judge if a point in a rectangle area
Example
use rsgeo::prelude::{CircleArea,Point,Area}; let ca = CircleArea::new(Point::new(35.0, 110.0).unwrap(), 350_000.0); let pa = Point::new(32.0, 112.0).unwrap(); let pb = Point::new(35.1, 112.0).unwrap(); assert!(!ca.contains(&pa)); assert!(ca.contains(&pb));
impl Debug for CircleArea
[src]
Auto Trait Implementations
impl RefUnwindSafe for CircleArea
impl Send for CircleArea
impl Sync for CircleArea
impl Unpin for CircleArea
impl UnwindSafe for CircleArea
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,
pub 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.
pub 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>,