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


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


impl CircleArea[src]

pub fn new(coc: Point, radius: f32) -> Self[src]

Trait Implementations

impl Area for CircleArea[src]

fn contains(&self, p: &Point) -> bool[src]

Judge if a point in a rectangle area


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();

impl Debug for CircleArea[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.