public static H3.Cell[] CalcCells2( Sphere[] mirrors, H3.Cell[] cells, Settings settings ) { HashSet<Vector3D> completedCellIds = new HashSet<Vector3D>( cells.Select( c => c.ID ).ToArray() ); List<H3.Cell> completedCells = new List<H3.Cell>( cells ); ReflectCellsRecursive2( mirrors, cells, settings, completedCells, completedCellIds ); return completedCells.ToArray(); }