26static double d_atan2(
double,
double);
59 for (i = 1; i < n_points - 1; i++) {
111 for (i = n_points - 2; i > 0; i--) {
155 for (i = 1; i < n_points; i++) {
181 G_debug(5,
"dig_line_degenerate()");
186 G_debug(5,
" Line is degenerate (one points)");
192 for (i = 1; i < n_points; i++) {
193 if (points->
x[i] != points->
x[i - 1] ||
194 points->
y[i] != points->
y[i - 1]) {
201 G_debug(5,
" Line is degenerate (more points)");
208static double d_atan2(
double y,
double x)
210 if (y == 0.0 && x == 0.0)
213 return (
atan2(y, x));
float dig_calc_end_angle(const struct line_pnts *points, double thresh)
float dig_calc_begin_angle(const struct line_pnts *points, double thresh)
int dig_line_degenerate(const struct line_pnts *points)
int dig_is_line_degenerate(const struct line_pnts *points, double thresh)
int G_debug(int, const char *,...) __attribute__((format(printf
Feature geometry info - coordinates.
double * y
Array of Y coordinates.
double * x
Array of X coordinates.
int n_points
Number of points.