pub fn find_closest_point<T, const N: usize>(
    point: &Point<T, N>,
    all_points: &[Point<T, N>],
) -> Point<T, N>
Expand description

Finds the closest matching target point to the passed source point.

§Arguments

  • point: A Point, for which to find the closest point.
  • all_points: A slice of Point, representing the target point cloud.

§Generics

  • T: Either an f32 or f64.
  • N: A const usize, representing the number of dimensions in the points.

§Returns

A Point, representing said closest point.

§Panics

this function will panic if the target_points is an empty slice.