+ art_dprint ("%08x = %.16f,%.16f -> %.16f %.16f\n", left_seg,
+ left_seg->x[0], left_seg->y0,
+ left_seg->x[1], left_seg->y1);
+ art_dprint ("(full: %.16f,%.16f -> %.16f %.16f)\n",
+ left_seg->in_seg->points[left_seg->in_curs - 1].x, left_seg->in_seg->points[left_seg->in_curs - 1].y,
+ left_seg->in_seg->points[left_seg->in_curs].x, left_seg->in_seg->points[left_seg->in_curs].y
+ );
+
+ art_dprint ("%08x = %.16f,%.16f -> %.16f %.16f\n", right_seg,
+ right_seg->x[0], right_seg->y0,
+ right_seg->x[1], right_seg->y1);
+ art_dprint ("(full: %.16f,%.16f -> %.16f %.16f)\n",
+ right_seg->in_seg->points[right_seg->in_curs - 1].x, right_seg->in_seg->points[right_seg->in_curs - 1].y,
+ right_seg->in_seg->points[right_seg->in_curs].x, right_seg->in_seg->points[right_seg->in_curs].y
+ );
+#endif
+
+#ifdef CHEAP_SANITYCHECK
+ if (right_seg->x[0] < left_seg->x[(left_seg->flags & ART_ACTIVE_FLAGS_BNEG) ^ 1]) {
+ /* notice: if we test *only* the line equation here, dd might be < 0, even though
+ right_seg was inserted to the right of left_seg correctly, due to numerical
+ instabilities */
+ double dd = right_seg->x[0] * left_seg->a + right_seg->y0 * left_seg->b + left_seg->c;
+ if(dd < 0) {
+ //art_warn ("segment %08x[%d] isn't to the left of %08x[%d]. d=%.16f\n",
+ // left_seg, left_seg->n_stack,
+ // right_seg, right_seg->n_stack,
+ // dd);
+ }
+ }