File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -472,11 +472,9 @@ double Delaunator::get_hull_area()
472472{
473473 std::vector<double > hull_area;
474474 size_t e = hull_start;
475- size_t cnt = 1 ;
476475 do {
477476 hull_area.push_back ((coords[2 * e] - coords[2 * hull_prev[e]]) *
478477 (coords[2 * e + 1 ] + coords[2 * hull_prev[e] + 1 ]));
479- cnt++;
480478 e = hull_next[e];
481479 } while (e != hull_start);
482480 return sum (hull_area);
@@ -493,6 +491,8 @@ double Delaunator::get_triangle_area()
493491 const double by = coords[2 * triangles[i + 1 ] + 1 ];
494492 const double cx = coords[2 * triangles[i + 2 ]];
495493 const double cy = coords[2 * triangles[i + 2 ] + 1 ];
494+ // ABELL - Is this right? It looks like a cross-product, which would give you twice the area.
495+ // Test.
496496 double val = std::fabs ((by - ay) * (cx - bx) - (bx - ax) * (cy - by));
497497 vals.push_back (val);
498498 }
You can’t perform that action at this time.
0 commit comments