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

Function segmentContains

docs/tests/v2/es6/js/sanddance.js:111731–111734  ·  view source on GitHub ↗
(a, b, c)

Source from the content-addressed store, hash-verified

111729}
111730
111731function segmentContains(a, b, c) {
111732 var i;
111733 return collinear(a, b, c) && within(a[i = +(a[0] === b[0])], c[i], b[i]);
111734}
111735
111736function collinear(a, b, c) {
111737 return (b[0] - a[0]) * (c[1] - a[1]) === (c[0] - a[0]) * (b[1] - a[1]);

Callers 1

ringContainsFunction · 0.70

Calls 2

collinearFunction · 0.70
withinFunction · 0.70

Tested by

no test coverage detected