* Returns the first corner of this rectangle (from top to bottom, left to right) * that is contained in the given rectangle, or null of the rectangles do not intersect. * * @param rect - The rectangle to check.
(rect: Rect)
| 128 | * @param rect - The rectangle to check. |
| 129 | */ |
| 130 | getCornerInRect(rect: Rect): RectCorner | null { |
| 131 | for (let key of ['topLeft', 'topRight', 'bottomLeft', 'bottomRight']) { |
| 132 | if (rect.containsPoint(this[key])) { |
| 133 | return key as RectCorner; |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | return null; |
| 138 | } |
| 139 | |
| 140 | equals(rect: Rect): boolean { |
| 141 | return ( |
nothing calls this directly
no test coverage detected