PostGIS  3.7.0dev-r@@SVN_REVISION@@

◆ lwt_edgeEnd_compare()

static int lwt_edgeEnd_compare ( const void *  i1,
const void *  i2 
)
static

Definition at line 129 of file lwt_edgeend_star.c.

130 {
131  const LWT_EDGEEND *ee1 = *(const LWT_EDGEEND **)i1;
132  const LWT_EDGEEND *ee2 = *(const LWT_EDGEEND **)i2;
133  int ret;
134  if ( ee1->azimuth < ee2->azimuth )
135  ret = -1;
136  else if ( ee1->azimuth > ee2->azimuth )
137  ret = 1;
138  else
139  ret = 0;
140 
141  LWDEBUGF(4, "qsort comparator for %s edge %lld with azimuth %g and %s edge %lld with azimuth %g returning %d",
142  ee1->outgoing ? "outgoing" : "incoming", ee1->edge->edge_id, ee1->azimuth,
143  ee2->outgoing ? "outgoing" : "incoming", ee2->edge->edge_id, ee2->azimuth,
144  ret
145  );
146 
147  return ret;
148 }
#define LWDEBUGF(level, msg,...)
Definition: lwgeom_log.h:106
double azimuth
Definition: lwt_edgeend.h:37
const LWT_ISO_EDGE * edge
Definition: lwt_edgeend.h:33
LWT_ELEMID edge_id

References LWT_EDGEEND_t::azimuth, LWT_EDGEEND_t::edge, LWT_ISO_EDGE::edge_id, LWDEBUGF, and LWT_EDGEEND_t::outgoing.

Referenced by lwt_edgeEndStar_ensureSorted().

Here is the caller graph for this function: