Rectangle.fromPoints constructor
Rectangle.fromPoints(
- Vector2 a,
- Vector2 b
Construct the smallest rectangle that encloses the given offsets, treating them as vectors from the origin.
Implementation
Rectangle.fromPoints(vm.Vector2 a, vm.Vector2 b)
: this.fromLTRB(
math.min(a.x, b.x),
math.min(a.y, b.y),
math.max(a.x, b.x),
math.max(a.y, b.y),
);