PostGIS  2.1.10dev-r@@SVN_REVISION@@
static double interpolate_arc ( double  angle,
double  a1,
double  a2,
double  a3,
double  zm1,
double  zm2,
double  zm3 
)
static

Definition at line 81 of file lwsegmentize.c.

References LWDEBUGF.

Referenced by lwcircle_segmentize().

82 {
83  LWDEBUGF(4,"angle %.05g a1 %.05g a2 %.05g a3 %.05g zm1 %.05g zm2 %.05g zm3 %.05g",angle,a1,a2,a3,zm1,zm2,zm3);
84  /* Counter-clockwise sweep */
85  if ( a1 < a2 )
86  {
87  if ( angle <= a2 )
88  return zm1 + (zm2-zm1) * (angle-a1) / (a2-a1);
89  else
90  return zm2 + (zm3-zm2) * (angle-a2) / (a3-a2);
91  }
92  /* Clockwise sweep */
93  else
94  {
95  if ( angle >= a2 )
96  return zm1 + (zm2-zm1) * (a1-angle) / (a1-a2);
97  else
98  return zm2 + (zm3-zm2) * (a2-angle) / (a2-a3);
99  }
100 }
#define LWDEBUGF(level, msg,...)
Definition: lwgeom_log.h:55

Here is the caller graph for this function: