PostGIS 3.7.0dev-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 131 of file lwstroke.c.

132{
133 double increment;
134 int perQuad = rint(tol);
135 // error out if tol != perQuad ? (not-round)
136 if ( perQuad != tol )
137 {
138 lwerror("lwarc_linearize: segments per quadrant must be an integer value, got %.15g", tol);
139 return -1;
140 }
141 if ( perQuad < 1 )
142 {
143 lwerror("lwarc_linearize: segments per quadrant must be at least 1, got %d", perQuad);
144 return -1;
145 }
146 increment = fabs(M_PI_2 / perQuad);
147 LWDEBUGF(2, "lwarc_linearize: perQuad:%d, increment:%g (%g degrees)", perQuad, increment, increment*180/M_PI);
148
149 return increment;
150}
#define LWDEBUGF(level, msg,...)
Definition lwgeom_log.h:106
void void lwerror(const char *fmt,...) __attribute__((format(printf
Write a notice out to the error handler.

References LWDEBUGF, and lwerror().

Referenced by lwarc_linearize().

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