Skip to main content

offset_aabb

Function offset_aabb 

Source
pub fn offset_aabb(box_: Aabb, origin: Pos) -> Aabb
Expand description

Translate a relative AABB into world space, rounding outward so the float box always contains the true box far from the origin. (b2OffsetAABB)

Float ULP at 1e8 dwarfs the AABB margin, so plain truncation could clip a shape out of its own box; the broadphase pair order rides on the deterministic directed rounding. In single precision this collapses to a plain sum since round_down_float/round_up_float are the identity.