logo

Trait nannou::prelude::geom::vertex::Average[][src]

pub trait Average: Vertex {
    fn average<I>(vertices: I) -> Option<Self>
    where
        I: IntoIterator<Item = Self>
; }
Expand description

Vertices whose average can be determined.

Useful for determining the centroid of triangles, quads and arbitrary polygons.

Required methods

Produce the average of the given sequence of vertices.

Returns None if the given iterator is empty.

Implementations on Foreign Types

Implementors