code: private int sortClockwise(int[] indices, IAtom focus, IAtom[] atoms, int n) {
          int x = 0;
          for (int j = 1; j < n; j++) {
              int v = indices[j];
              int i = j - 1;
              while ((i >= 0) && less(v, indices[i], atoms, focus.getPoint2d())) {
                  indices[i + 1] = indices[i--];
                  x++;
              }
              indices[i + 1] = v;
          }
          return indexParity(x);
      }
docs: Sort the {@code indices}, which correspond to an index in the {@code atoms} array in
  clockwise order.
  
  @param indices indices, 0 to n
  @param focus   the central atom
  @param atoms   the neighbors of the focus
  @param n       the number of neighbors
  @return the permutation parity of the sort