PostGIS 3.0.6dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ interpolate_arc()

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

Definition at line 96 of file lwstroke.c.

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

References LWDEBUGF.

Referenced by lwarc_linearize().

Here is the caller graph for this function: