cf_make_aabb_pos_w_h¶
Category: math
GitHub: cute_math.h
Returns an AABB (axis-aligned bounding box).
CF_Aabb cf_make_aabb_pos_w_h(CF_V2 pos, float w, float h) { CF_Aabb bb; CF_V2 he = cf_mul_v2_f(cf_v2(w, h), 0.5f); bb.min = cf_sub(pos, he); bb.max = cf_add(pos, he); return bb; }
Related Pages¶
CF_Aabb
cf_make_aabb
cf_make_aabb_from_top_left
cf_make_aabb_center_half_extents