-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# 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.
- Loading branch information
Showing
4 changed files
with
44 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters