2D AABBs

In what follows are various notes and equations dealing with 2D AABBs.

AABB of Points

Point-AABB Hit Detection

No collision iff
\(x \lt A_x\) or \(x \gt B_x\) or
\(y \lt A_y\) or \(y \gt B_y\)

AABB-AABB Hit Detection

No collision iff
\(B_x \lt C_x\) or \(A_x \gt D_x\) or
\(B_y \lt C_y\) or \(A_y \gt D_y\)