getEdge method

HalfEdge? getEdge(
  1. num i
)

Implementation

HalfEdge? getEdge(num i) {
  HalfEdge? edge = this.edge;

  while (i > 0) {
    edge = edge!.next;
    i--;
  }

  while (i < 0) {
    edge = edge!.prev;
    i++;
  }

  return edge;
}