code: private Triangle findValidTriangle(Vector2i minInvalidCell) {
          // If the invalid cell is the minimal one in the grid we are forced to search the
          // triangulation for a trinagle at that location
          if (minInvalidCell.getX() == 0 && minInvalidCell.getY() == 0)
              return indexDelaunay.find(middleOfCell(minInvalidCell.getX(), minInvalidCell.getY()), null);
          else
              // Otherwise we can take an adjacent cell triangle that is still valid
              return grid[Math.min(0, minInvalidCell.getX())][Math.min(0, minInvalidCell.getY())];
      }
docs: Finds a valid (existing) trinagle adjacent to a given invalid cell
  
  @param minInvalidCell minimum bounding box invalid cell
  @return a valid triangle adjacent to the invalid cell