PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ uniq()

static int uniq ( double *  vals,
int  nvals 
)
static

Definition at line 1020 of file lwlinearreferencing.c.

Referenced by lwgeom_cpa_within(), and lwgeom_tcpa().

1021 {
1022  int i, last=0;
1023  for (i=1; i<nvals; ++i)
1024  {
1025  // lwnotice("(I%d):%g", i, vals[i]);
1026  if ( vals[i] != vals[last] )
1027  {
1028  vals[++last] = vals[i];
1029  // lwnotice("(O%d):%g", last, vals[last]);
1030  }
1031  }
1032  return last+1;
1033 }
Here is the caller graph for this function: