aabb2 [object]
In this object, assume 1 = min and 2 = max.
- methods
- expand - include other vec2/aabb2 items in current AABB
- read-only properties
- [real] width -- x2 - x1
- [real] height -- y2 - y1
- [vec2] center -- (p1 + p2) / 2
- [real] area -- width * height
- [bool] valid -- returns if x1 <= x2 and y1 <= y2
- read/write properties
- [real] x1
- [real] y1
- [real] x2
- [real] y2
- [vec2] p1
- [vec2] p2
- overloaded operators
- comparison between aabb2 values: first by X1, then by Y1, then by X2, then by Y2
- other features:
- cloning support
- serialization support
- GC-safe
- tostring, dump = "aabb2(<x1>;<y1> - <x2>;<y2>)"