public static Vector2D FindCentroid(ISpread<Blob> blobs) { var summ = new Vector2D(); return blobs.Aggregate(summ, (current, blob) => current + blob.Position) / blobs.Count(); }
public static Vector2D FindCentroid(ISpread <Blob> blobs) { var summ = new Vector2D(); return(blobs.Aggregate(summ, (current, blob) => current + blob.Position) / blobs.Count()); }