Calculate the box->box distance.
575 ndims = Min(GIDX_NDIMS(b), GIDX_NDIMS(a));
576 for (i = 0; i < ndims; ++i)
579 double amin = GIDX_GET_MIN(a, i);
580 double amax = GIDX_GET_MAX(a, i);
581 double bmin = GIDX_GET_MIN(b, i);
582 double bmax = GIDX_GET_MAX(b, i);
583 POSTGIS_DEBUGF(3,
"A %g - %g", amin, amax);
584 POSTGIS_DEBUGF(3,
"B %g - %g", bmin, bmax);
586 if ((amin <= bmax && amax >= bmin))
591 else if (i == 4 && m_is_time)
595 else if (bmax < amin)
612 POSTGIS_DEBUGF(3,
"dist %g, squared %g, grows sum to %g", d, d * d, sum);