Skip to content

Commit 59bdea2

Browse files
committed
More comments
1 parent c2f2d43 commit 59bdea2

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/geom/hull.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,12 @@ d3.geom.hull = function(vertices) {
4545
var skip_l = (lhull[0] === uhull[0]),
4646
skip_r = (lhull[lhull.length - 1] === uhull[uhull.length - 1]),
4747
poly = [];
48+
4849
for (var i=uhull.length - 1; i >= 0; i--)
49-
poly.push(data[points[uhull[i]][2]]);
50+
poly.push(data[points[uhull[i]][2]]); // add upper hull in r->l order
5051
for (var i = +skip_l; i < lhull.length - skip_r; i++)
51-
poly.push(data[points[lhull[i]][2]]);
52+
poly.push(data[points[lhull[i]][2]]); // add lower hull in l->r order
53+
5254
return poly;
5355
}
5456

0 commit comments

Comments
 (0)