Function nannou::geom::centroid
[−]
[src]
pub fn centroid<I, S>(vertices: I) -> Option<I::Item> where
I: IntoIterator,
I::Item: Vertex<Scalar = S> + EuclideanSpace<Scalar = S>,
<I::Item as EuclideanSpace>::Diff: Div<S, Output = <I::Item as EuclideanSpace>::Diff>,
S: BaseFloat,
The centroid
(average position) of all vertices in the given iterator.
Returns None
if the given iterator contains no vertices.