code: public HalfEdge getEdge(int i) {
          HalfEdge he = he0;
          while (i > 0) {
              he = he.next;
              i--;
          }
          while (i < 0) {
              he = he.prev;
              i++;
          }
          return he;
      }
docs: Gets the i-th half-edge associated with the face.
  
  @param i
  the half-edge index, in the range 0-2.
  @return the half-edge