Function is_single_point_in_polygon

Source
pub fn is_single_point_in_polygon<T>(
    point: &Point2<T>,
    polygon: &[Point2<T>],
) -> bool
where T: Copy + RealField, f32: AsPrimitive<T>,
Expand description

Check if the provided point is within the provided polygon.

§Arguments

  • point: A reference to a Point2.
  • polygon: A slice of Point2s representing the vertices.

§Generics:

§Returns

A boolean value, specifying if the point is within the polygon.