PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ RTreeCreateInterval()

static RTREE_INTERVAL* RTreeCreateInterval ( double  value1,
double  value2 

Creates an interval given the min and max values, in arbitrary order.

Definition at line 115 of file lwgeom_rtree.c.

References FP_MAX, FP_MIN, lwalloc(), RTREE_INTERVAL::max, and RTREE_INTERVAL::min.

Referenced by RTreeCreateLeafNode().

116 {
117  RTREE_INTERVAL *interval;
119  POSTGIS_DEBUGF(2, "RTreeCreateInterval called with %8.3f, %8.3f", value1, value2);
121  interval = lwalloc(sizeof(RTREE_INTERVAL));
122  interval->max = FP_MAX(value1, value2);
123  interval->min = FP_MIN(value1, value2);
125  POSTGIS_DEBUGF(3, "interval min = %8.3f, max = %8.3f", interval->min, interval->max);
127  return interval;
128 }
#define FP_MIN(A, B)
Representation for the y-axis interval spanned by an edge.
Definition: lwgeom_rtree.h:9
void * lwalloc(size_t size)
Definition: lwutil.c:199
#define FP_MAX(A, B)
Here is the call graph for this function:
Here is the caller graph for this function: