MCPcopy Index your code
hub / github.com/rough-stuff/rough-notation / isSameRect

Method isSameRect

src/rough-notation.ts:143–151  ·  view source on GitHub ↗
(rect1: Rect, rect2: Rect)

Source from the content-addressed store, hash-verified

141 }
142
143 private isSameRect(rect1: Rect, rect2: Rect): boolean {
144 const si = (a: number, b: number) => Math.round(a) === Math.round(b);
145 return (
146 si(rect1.x, rect2.x) &&
147 si(rect1.y, rect2.y) &&
148 si(rect1.w, rect2.w) &&
149 si(rect1.h, rect2.h)
150 );
151 }
152
153 isShowing(): boolean {
154 return (this._state !== 'not-showing');

Callers 1

haveRectsChangedMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected