rust_sc2::distance

Trait Center

Source
pub trait Center: Iterator + Sized
where Self::Item: Into<Point2>,
{ // Provided method fn center(self) -> Option<Point2> { ... } }
Expand description

Helper trait for iterator of points, used to find center of these points.

Provided Methods§

Source

fn center(self) -> Option<Point2>

Returns center of all iterated points or None if iterator is empty.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<I> Center for I
where I: Iterator + Sized, I::Item: Into<Point2>,