bool contains(Geom other) { return switch (other) { Point() => containsPoint(other), Rect() => containsRect(other), _ => false, }; }