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

Function getLeftmost

docs/app/js/sanddance-app.js:102016–102024  ·  view source on GitHub ↗
(start)

Source from the content-addressed store, hash-verified

102014 return x | y << 1;
102015}
102016function getLeftmost(start) {
102017 let p = start;
102018 let leftmost = start;
102019 do {
102020 if (p.x < leftmost.x || p.x === leftmost.x && p.y < leftmost.y) leftmost = p;
102021 p = p.next;
102022 }while (p !== start);
102023 return leftmost;
102024}
102025function pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {
102026 return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 && (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 && (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;
102027}

Callers 1

eliminateHolesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected