| 283 | Rect(Vec pos, Vec size) : pos(pos), size(size) {} |
| 284 | Rect(float posX, float posY, float sizeX, float sizeY) : pos(Vec(posX, posY)), size(Vec(sizeX, sizeY)) {} |
| 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 { |