aabb2d_zero, aabb2d_diagonal and aabb2d_size #392
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
_aabb2d_zero
.Problem
Currently
aabb2d_size
returnsvec2_distance(min, max)
, which would be the diagonal of the aabb, if you want to use the size to resolve collisions, you need to work backwards from what aabb2d_size does when it calls vec2_distance.Solution
_size
->_diag
. And provide a macro for compatibility_sizev
function which outputs a vec2, which is basically glm_vec2_sub(max, min, out).Looking for feedback if this is desirable, maybe come up with another name to avoid a breaking change on _size?