Closed duarm closed 7 months ago
I should also split _zero into another PR
Hi @duarm,
Sorry for the delay, I like the your new interpretation of _size
and _diagonal
/_diag
we can go in this way. This will break existing codebase so keeping and deprecating _size
for backward compatibility, introduce _sizev
( v/vector suffix ) for sizes as vector and _diagonal
/_diag
for size of diagonal would be an option.
Feedbacks are welcome
size -> diag and new _sizev function, made a macro for _size to _diag. Should we do the same for aabb, or should I open another PR?
Should we do the same for aabb, or should I open another PR?
Yes other PR would be better, thanks 👍
@duarm the PR is merged, thanks for your contributions 🚀
_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?