PostGIS  2.2.7dev-r@@SVN_REVISION@@
static RTREE_INTERVAL* RTreeCreateInterval ( double  value1,
double  value2 
)
static

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;
118 
119  POSTGIS_DEBUGF(2, "RTreeCreateInterval called with %8.3f, %8.3f", value1, value2);
120 
121  interval = lwalloc(sizeof(RTREE_INTERVAL));
122  interval->max = FP_MAX(value1, value2);
123  interval->min = FP_MIN(value1, value2);
124 
125  POSTGIS_DEBUGF(3, "interval min = %8.3f, max = %8.3f", interval->min, interval->max);
126 
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: