/// Returns central position of all units in the collection or `None` if collection is empty.
Returns central position of all units in the collection or `None` if collection is empty.
Returns central position of all units in the collection or ` None ` if collection is empty .
pub fn center(&self) -> Option<Point2> {
		if self.is_empty() {
			None
		} else {
			Some(self.sum(|u| u.position()) / self.len() as f32)
		}
	}
pub fn center ( & self ) -> Option < Point2 > { if self . is_empty ( ) { None } else { Some ( self . sum ( | u | u . position ( ) ) / self . len ( ) as f32 ) } }
Returns central position of all units in the collection or `None` if collection is empty.
Returns central position of all units in the collection or ` None ` if collection is empty .
&self