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

Function intersectRect

docs/app/js/sanddance-app.js:122204–122207  ·  view source on GitHub ↗
(item, box)

Source from the content-addressed store, hash-verified

122202 return box.contains(item.x || 0, item.y || 0);
122203}
122204function intersectRect(item, box) {
122205 const x23 = item.x || 0, y22 = item.y || 0, w4 = item.width || 0, h9 = item.height || 0;
122206 return box.intersects(b.set(x23, y22, x23 + w4, y22 + h9));
122207}
122208function intersectRule(item, box) {
122209 const x24 = item.x || 0, y23 = item.y || 0, x2 = item.x2 != null ? item.x2 : x24, y2 = item.y2 != null ? item.y2 : y23;
122210 return intersectBoxLine(box, x24, y23, x2, y2);

Callers

nothing calls this directly

Calls 1

setMethod · 0.45

Tested by

no test coverage detected