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

Function overlapArea

graph-ui/src/ui/tooltip/tooltip-model.ts:112–116  ·  view source on GitHub ↗
(a: HintRect, b: HintRect)

Source from the content-addressed store, hash-verified

110
111/** Die Flaeche, die zwei Rechtecke gemeinsam haben. Null, wenn sie sich nicht beruehren. */
112export function overlapArea(a: HintRect, b: HintRect): number {
113 const width = Math.min(a.x + a.width, b.x + b.width) - Math.max(a.x, b.x);
114 const height = Math.min(a.y + a.height, b.y + b.height) - Math.max(a.y, b.y);
115 return width > 0 && height > 0 ? width * height : 0;
116}
117
118/** Einen Wert in einen Bereich zwingen. */
119function clamp(value: number, low: number, high: number): number {

Callers 4

coversFunction · 0.70
slideClearFunction · 0.70
placeHintFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected