Function are_multiple_points_in_polygon

Source
pub fn are_multiple_points_in_polygon<T>(
    points: &[Point2<T>],
    polygon: &[Point2<T>],
) -> Option<Vec<bool>>
where T: Bounded + Copy + RealField, f32: AsPrimitive<T>,
Expand description

This function will run the is_single_point_in_polygon for each on of the points given, and the provided polygon, But pre-calculates the polygon extents to reduce workloads for larger datasets, please profile this for you specific use-case.

§Arguments

  • points: A slice of Point2.
  • polygon: A slice of Point2s, representing the vertices.

§Generics:

§Returns

A Vec of booleans, with the same size as points, containing the result for each point.