pub trait Average: Vertex {
// Required method
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§
sourcefn average<I>(vertices: I) -> Option<Self>where
I: IntoIterator<Item = Self>,
fn average<I>(vertices: I) -> Option<Self>where
I: IntoIterator<Item = Self>,
Produce the average of the given sequence of vertices.
Returns None
if the given iterator is empty.
Object Safety§
This trait is not object safe.