cargo fmt
This commit is contained in:
parent
11a5346291
commit
2e76e82cc0
4 changed files with 7 additions and 4 deletions
|
@ -406,7 +406,10 @@ where
|
||||||
/// let centroid = Point2::centroid(&triangle);
|
/// let centroid = Point2::centroid(&triangle);
|
||||||
/// ```
|
/// ```
|
||||||
#[inline]
|
#[inline]
|
||||||
fn centroid(points: &[Self]) -> Self where Self::Scalar: NumCast {
|
fn centroid(points: &[Self]) -> Self
|
||||||
|
where
|
||||||
|
Self::Scalar: NumCast,
|
||||||
|
{
|
||||||
let total_displacement = points
|
let total_displacement = points
|
||||||
.iter()
|
.iter()
|
||||||
.fold(Self::Diff::zero(), |acc, p| acc + p.to_vec());
|
.fold(Self::Diff::zero(), |acc, p| acc + p.to_vec());
|
||||||
|
|
Loading…
Reference in a new issue