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

Function segmentContains

external/.d3.js:6366–6368  ·  view source on GitHub ↗
(a, b, c)

Source from the content-addressed store, hash-verified

6364}
6365
6366function segmentContains(a, b, c) {
6367 var i; return collinear$1(a, b, c) && within(a[i = +(a[0] === b[0])], c[i], b[i]);
6368}
6369
6370function collinear$1(a, b, c) {
6371 return (b[0] - a[0]) * (c[1] - a[1]) === (c[0] - a[0]) * (b[1] - a[1]);

Callers 1

ringContainsFunction · 0.85

Calls 2

collinear$1Function · 0.85
withinFunction · 0.85

Tested by

no test coverage detected