Constructs a Rect from any two opposite corners. */
| 313 | /** Constructs a Rect from any two opposite corners. |
| 314 | */ |
| 315 | static Rect fromCorners(Vec a, Vec b) { |
| 316 | return fromMinMax(a.min(b), a.max(b)); |
| 317 | } |
| 318 | /** Returns the infinite Rect. */ |
| 319 | static Rect inf() { |
| 320 | return Rect(Vec(-INFINITY, -INFINITY), Vec(INFINITY, INFINITY)); |