[−][src]Function voronator::delaunator::triangulate_from_arr
pub fn triangulate_from_arr(
coords: &[f64]
) -> Option<(Triangulation, Vec<Point>)>
Calculates the Delaunay triangulation, if it exists, for a given set of 2D points.
Points are passed a flat array of f64
of size 2n
, where n is the
number of points and for each point i
, {x = 2i, y = 2i + 1}
and
converted internally to delaunator::Point
. It returns both the triangulation
and the vector of delaunator::Point
to be used, if desired.
Arguments
coords
- A vector off64
of size2n
, where for each pointi
,x = 2i
and y =2i + 1
.