MCPcopy Create free account
hub / github.com/microsoft/SandDance / segmentContains

Function segmentContains

docs/app/js/sanddance-app.js:130624–130627  ·  view source on GitHub ↗
(a, b, c)

Source from the content-addressed store, hash-verified

130622 return contains1;
130623}
130624function segmentContains(a, b, c) {
130625 var i;
130626 return collinear(a, b, c) && within(a[i = +(a[0] === b[0])], c[i], b[i]);
130627}
130628function collinear(a, b, c) {
130629 return (b[0] - a[0]) * (c[1] - a[1]) === (c[0] - a[0]) * (b[1] - a[1]);
130630}

Callers 1

ringContainsFunction · 0.70

Calls 2

collinearFunction · 0.70
withinFunction · 0.70

Tested by

no test coverage detected