Rectangle
Builds the axis-aligned rectangle spanning two opposite corners.
Any opposite pair in any order — the coordinates are normalized to min/max. The result is always the counter-clockwise quad bottom-left → bottom-right → top-right → top-left, so equal rectangles compare equal with no canonicalization and the edge indices are fixed: edges[0] bottom, [1] right, [2] top, [3] left. Integer indexing is structural — a moved rectangle keeps its indices — while RectSide indexing is visual, following the sides through any pose.
Return
The four-vertex Polygon of the rectangle.
Parameters
a
One corner.
b
The opposite corner.
Throws
When a corner lies at infinity, or the corners share a rounded x or y — zero extent, the quad collapses.