Function calculate_point_cloud_center
Source pub fn calculate_point_cloud_center<T, const N: usize>(
points: &[Point<T, N>],
) -> Point<T, N>
Expand description
Calculates the mean(centroid) of the point cloud.
§Arguments
- points: a slice of
Point
, representing the 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 the point cloud centroid.
Returns Point::default() if point cloud is empty.