PostGIS  2.3.7dev-r@@SVN_REVISION@@
static int nd_box_expand ( ND_BOX nd_box,
double  expansion_factor 
)
static

Expand an ND_BOX ever so slightly.

Expand parameter is the proportion of total width to add.

Definition at line 600 of file gserialized_estimate.c.

References ND_BOX_T::max, ND_BOX_T::min, ND_DIMS, and TRUE.

Referenced by compute_gserialized_stats_mode().

601 {
602  int d;
603  double size;
604  for ( d = 0; d < ND_DIMS; d++ )
605  {
606  size = nd_box->max[d] - nd_box->min[d];
607  if ( size <= 0 ) continue;
608  nd_box->min[d] -= size * expansion_factor / 2;
609  nd_box->max[d] += size * expansion_factor / 2;
610  }
611  return TRUE;
612 }
#define ND_DIMS
The maximum number of dimensions our code can handle.
float4 max[ND_DIMS]
float4 min[ND_DIMS]
#define TRUE
Definition: dbfopen.c:169

Here is the caller graph for this function: