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

Function d3_geom_polygonIntersect

explainshell/web/static/js/d3.v3.js:4079–4082  ·  view source on GitHub ↗
(c, d, a, b)

Source from the content-addressed store, hash-verified

4077 return (b[0] - a[0]) * (p[1] - a[1]) < (b[1] - a[1]) * (p[0] - a[0]);
4078 }
4079 function d3_geom_polygonIntersect(c, d, a, b) {
4080 var x1 = c[0], x3 = a[0], x21 = d[0] - x1, x43 = b[0] - x3, y1 = c[1], y3 = a[1], y21 = d[1] - y1, y43 = b[1] - y3, ua = (x43 * (y1 - y3) - y43 * (x1 - x3)) / (y43 * x21 - x43 * y21);
4081 return [ x1 + ua * x21, y1 + ua * y21 ];
4082 }
4083 d3.geom.delaunay = function(vertices) {
4084 var edges = vertices.map(function() {
4085 return [];

Callers 1

d3.v3.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected