MCPcopy Create free account
hub / github.com/breck7/scroll / orient2d

Function orient2d

external/.d3.js:6998–7007  ·  view source on GitHub ↗
(ax, ay, bx, by, cx, cy)

Source from the content-addressed store, hash-verified

6996}
6997
6998function orient2d(ax, ay, bx, by, cx, cy) {
6999 const detleft = (ay - cy) * (bx - cx);
7000 const detright = (ax - cx) * (by - cy);
7001 const det = detleft - detright;
7002
7003 const detsum = Math.abs(detleft + detright);
7004 if (Math.abs(det) >= ccwerrboundA * detsum) return det;
7005
7006 return -orient2dadapt(ax, ay, bx, by, cx, cy, detsum);
7007}
7008
7009const EPSILON = Math.pow(2, -52);
7010const EDGE_STACK = new Uint32Array(512);

Callers 1

updateMethod · 0.85

Calls 1

orient2dadaptFunction · 0.85

Tested by

no test coverage detected