| 285 | static Rect fromMinMax(Vec a, Vec b) { return Rect(a, b.minus(a)); } |
| 286 | static Rect fromCorners(Vec a, Vec b) { return fromMinMax(a.min(b), a.max(b)); } |
| 287 | static Rect inf() { return Rect(Vec(-INFINITY, -INFINITY), Vec(INFINITY, INFINITY)); } |
| 288 | bool contains(Vec v) const { |
| 289 | return (pos.x <= v.x) && (size.x == INFINITY || v.x < pos.x + size.x) |
| 290 | && (pos.y <= v.y) && (size.y == INFINITY || v.y < pos.y + size.y); |