MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / intersectionArea

Function intersectionArea

graph-ui/tests/scaffold/w12a.test.mjs:14–18  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

12const report = () => JSON.parse(read('verification/w12a/command-overlay.json'));
13
14function intersectionArea(a, b) {
15 const width = Math.max(0, Math.min(a.x + a.width, b.x + b.width) - Math.max(a.x, b.x));
16 const height = Math.max(0, Math.min(a.y + a.height, b.y + b.height) - Math.max(a.y, b.y));
17 return width * height;
18}
19
20test('AC1: the real post-search state keeps its help without covering unfold', () => {
21 const r = report();

Callers 1

w12a.test.mjsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected