removeDupEndPts static method

void removeDupEndPts(
  1. dynamic points
)

Implementation

static void removeDupEndPts(points) {
  final l = points.length;

  if (l > 2 && points[l - 1].equals(points[0])) {
    points.removeLast();
  }
}