MCPcopy Create free account
hub / github.com/idank/explainshell / d3_geom_hullCCW

Function d3_geom_hullCCW

explainshell/web/static/js/d3.v3.js:4017–4029  ·  view source on GitHub ↗
(i1, i2, i3, v)

Source from the content-addressed store, hash-verified

4015 return hull;
4016 };
4017 function d3_geom_hullCCW(i1, i2, i3, v) {
4018 var t, a, b, c, d, e, f;
4019 t = v[i1];
4020 a = t[0];
4021 b = t[1];
4022 t = v[i2];
4023 c = t[0];
4024 d = t[1];
4025 t = v[i3];
4026 e = t[0];
4027 f = t[1];
4028 return (f - b) * (c - a) - (d - b) * (e - a) > 0;
4029 }
4030 d3.geom.polygon = function(coordinates) {
4031 coordinates.area = function() {
4032 var i = 0, n = coordinates.length, area = coordinates[n - 1][1] * coordinates[0][0] - coordinates[n - 1][0] * coordinates[0][1];

Callers 1

hullFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected