toVertices method
Returns a list of Vector2 vertices representing the four corners in clockwise order.
Implementation
List<Vector2> toVertices() {
return [
topLeft.toVector2(),
topRight.toVector2(),
bottomRight.toVector2(),
bottomLeft.toVector2(),
];
}