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

Function onSegment

docs/app/js/sanddance-app.js:102049–102051  ·  view source on GitHub ↗
(p, q, r)

Source from the content-addressed store, hash-verified

102047 return false;
102048}
102049function onSegment(p, q, r) {
102050 return q.x <= Math.max(p.x, r.x) && q.x >= Math.min(p.x, r.x) && q.y <= Math.max(p.y, r.y) && q.y >= Math.min(p.y, r.y);
102051}
102052function sign(num) {
102053 return num > 0 ? 1 : num < 0 ? -1 : 0;
102054}

Callers 1

intersectsFunction · 0.70

Calls 2

maxMethod · 0.45
minMethod · 0.45

Tested by

no test coverage detected