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

◆ angle_increment_using_segments_per_quad()

static double angle_increment_using_segments_per_quad ( double  tol)
static

Definition at line 119 of file lwstroke.c.

120{
121 double increment;
122 int perQuad = rint(tol);
123 // error out if tol != perQuad ? (not-round)
124 if ( perQuad != tol )
125 {
126 lwerror("lwarc_linearize: segments per quadrant must be an integer value, got %.15g", tol, perQuad);
127 return -1;
128 }
129 if ( perQuad < 1 )
130 {
131 lwerror("lwarc_linearize: segments per quadrant must be at least 1, got %d", perQuad);
132 return -1;
133 }
134 increment = fabs(M_PI_2 / perQuad);
135 LWDEBUGF(2, "lwarc_linearize: perQuad:%d, increment:%g (%g degrees)", perQuad, increment, increment*180/M_PI);
136
137 return increment;
138}
#define LWDEBUGF(level, msg,...)
Definition lwgeom_log.h:88
void lwerror(const char *fmt,...)
Write a notice out to the error handler.
Definition lwutil.c:190

References LWDEBUGF, and lwerror().

Referenced by lwarc_linearize().

Here is the call graph for this function:
Here is the caller graph for this function: