recp / cglm

📽 Highly Optimized 2D / 3D Graphics Math (glm) for C

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

2d aabb

duarm opened this issue · comments

Been using my own 2d aabb implementation for some time, just noticed cglm now provides a 3d aabb (two vec3's), would a 2d version of the aabb functions be welcome? questions:

  • How the functions should be named? glm_aabb2d_size()? glm_aabs_size() (axis-aligned bounding-square, this one kinda goofy)?
  • The name of the file? currently the aabb functions are located on box.h, should we create a aabb2d.h? square.h?

Hi @duarm,

would a 2d version of the aabb functions be welcome

Definitely, it would be nice to have 2d aabb :) aabb2d.h header and aabb2d namespace is fine. square.h would match box.h but in the future maybe we change box.h into aabb.h not sure but aabb2d.h can be used for now.