Returns true if two rectangles have identical values. Both rectangles must be positioned or not.
import { Rects } from "https://unpkg.com/ixfx/dist/geometry.js";const rectA = { width: 10, height: 10, x: 10, y: 10 };const rectB = { width: 10, height: 10, x: 20, y: 20 };// False, because coordinates are differentRects.isEqual(rectA, rectB)// True, even though x,y are differentRects.isEqualSize(rectA, rectB); Copy
import { Rects } from "https://unpkg.com/ixfx/dist/geometry.js";const rectA = { width: 10, height: 10, x: 10, y: 10 };const rectB = { width: 10, height: 10, x: 20, y: 20 };// False, because coordinates are differentRects.isEqual(rectA, rectB)// True, even though x,y are differentRects.isEqualSize(rectA, rectB);
Returns true if two rectangles have identical values. Both rectangles must be positioned or not.