10     bool DetectCollision2D(
SCR_AABB other)
 
   13             m_vMin[0] < other.m_vMin[0] + other.m_vDimensions[0] &&
 
   14             m_vMin[0] + m_vDimensions[0] > other.m_vMin[0] &&
 
   15             m_vMin[2] < other.m_vMin[2] + other.m_vDimensions[2] &&
 
   16             m_vMin[2] + m_vDimensions[2] > other.m_vMin[2];
 
   20     void SCR_AABB(notnull array<vector> points)
 
   25         m_vMin = { 
float.MAX, 
float.MAX, 
float.MAX };
 
   26         m_vMax = { -
float.MAX, -
float.MAX, -
float.MAX };
 
   28         foreach (vector point : points)
 
   30             for (
int i = 0; i < 3; i++)
 
   32                 if (point[i] < m_vMin[i])
 
   35                 if (point[i] > m_vMax[i])
 
   40         m_vDimensions = m_vMax - m_vMin;