Polygon(List<Point<num>> points) : points = points.toList(growable: false) { if (this.points.length < 3) { throw ArgumentError('Please provide three or more points.'); } }