![]() # Objective Currently, the only way to create an AABB is to specify its `min` and `max` coordinates. However, it's often more useful to use the center and half-size instead. ## Solution Add `new` constructors for `Aabb2d` and `Aabb3d`. This: ```rust let aabb = Aabb3d { min: center - half_size, max: center + half_size, } ``` becomes this: ```rust let aabb = Aabb3d::new(center, half_size); ``` I also made the usage of "half-extents" vs. "half-size" a bit more consistent. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |