Function mapping_algorithms::utils::point_cloud::find_closest_point
source · 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
: APoint
, for which to find the closest point.all_points
: A slice ofPoint
, representing the target point cloud.
§Generics
§Returns
A Point
, representing said closest point.
§Panics
this function will panic if the target_points
is an empty slice.