Function
aabbCorners
The rectangle to read.
The corners: top-left, top-right, bottom-right, bottom-left.
List the four corners of an axis-aligned rectangle, in clockwise order starting top-left. Use it to feed a DOMRect into the polygon helpers, which expect point lists.
DOMRect
aabbCorners