combine method
Set this AABB to the combined AABB of aabb1 and aabb2.
Implementation
AABB combine(AABB aabb1,AABB aabb2 ) {
List<double> a = aabb1.elements;
List<double> b = aabb2.elements;
List<double> te = elements;
te[0] = a[0] < b[0] ? a[0] : b[0];
te[1] = a[1] < b[1] ? a[1] : b[1];
te[2] = a[2] < b[2] ? a[2] : b[2];
te[3] = a[3] > b[3] ? a[3] : b[3];
te[4] = a[4] > b[4] ? a[4] : b[4];
te[5] = a[5] > b[5] ? a[5] : b[5];
return this;
}