PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ interpolate_arc()

static double interpolate_arc ( double  angle,
double  a1,
double  a2,
double  a3,
double  zm1,
double  zm2,
double  zm3 
)
static

Definition at line 95 of file lwstroke.c.

References LWDEBUGF.

Referenced by lwarc_linearize().

96 {
97  LWDEBUGF(4,"angle %.05g a1 %.05g a2 %.05g a3 %.05g zm1 %.05g zm2 %.05g zm3 %.05g",angle,a1,a2,a3,zm1,zm2,zm3);
98  /* Counter-clockwise sweep */
99  if ( a1 < a2 )
100  {
101  if ( angle <= a2 )
102  return zm1 + (zm2-zm1) * (angle-a1) / (a2-a1);
103  else
104  return zm2 + (zm3-zm2) * (angle-a2) / (a3-a2);
105  }
106  /* Clockwise sweep */
107  else
108  {
109  if ( angle >= a2 )
110  return zm1 + (zm2-zm1) * (a1-angle) / (a1-a2);
111  else
112  return zm2 + (zm3-zm2) * (a2-angle) / (a2-a3);
113  }
114 }
#define LWDEBUGF(level, msg,...)
Definition: lwgeom_log.h:88
Here is the caller graph for this function: