PostGIS  2.3.7dev-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 129 of file lwgeom_rtree.c.

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

Referenced by RTreeCreateLeafNode().

130 {
131  RTREE_INTERVAL *interval;
133  POSTGIS_DEBUGF(2, "RTreeCreateInterval called with %8.3f, %8.3f", value1, value2);
135  interval = lwalloc(sizeof(RTREE_INTERVAL));
136  interval->max = FP_MAX(value1, value2);
137  interval->min = FP_MIN(value1, value2);
139  POSTGIS_DEBUGF(3, "interval min = %8.3f, max = %8.3f", interval->min, interval->max);
141  return interval;
142 }
#define FP_MIN(A, B)
Representation for the y-axis interval spanned by an edge.
Definition: lwgeom_rtree.h:33
void * lwalloc(size_t size)
Definition: lwutil.c:227
#define FP_MAX(A, B)
Here is the call graph for this function:
Here is the caller graph for this function: