Voronoi constructor

Voronoi(
  1. Delaunay delaunay, {
  2. List<double>? bounds,
})

Creates a Voronoi diagram from a Delaunay triangulation.

The bounds parameter specifies the clipping rectangle as xmin, ymin, xmax, ymax. If not provided, it's computed from the input points with padding.

Implementation

Voronoi(this.delaunay, {List<double>? bounds})
    : xmin = bounds?[0] ?? double.negativeInfinity,
      ymin = bounds?[1] ?? double.negativeInfinity,
      xmax = bounds?[2] ?? double.infinity,
      ymax = bounds?[3] ?? double.infinity {
  _computeCircumcenters();
  _buildPointToEdges();
}