Index: Makefile =================================================================== --- Makefile (revision 33225) +++ Makefile (revision 33226) @@ -1,4 +1,4 @@ -CFLAGS=-Wall -O0 -g3 -I. -I../../../src_3rd +CFLAGS=-Wall -O0 -g3 -I. -I.. -I../.. LDFLAGS=-lm cdt_test: cdt_test.o cdt.o point.o edge.o triangle.o Index: cdt_test.c =================================================================== --- cdt_test.c (revision 33225) +++ cdt_test.c (revision 33226) @@ -2,19 +2,6 @@ #include #include "cdt.h" -#define ORIENT_CCW(a, b, c) (orientation(a, b, c) < 0) -#define ORIENT_CW(a, b, c) (orientation(a, b, c) > 0) -/* TODO: check epsilon for collinear case? */ -#define ORIENT_COLLINEAR(a, b, c) (orientation(a, b, c) == 0) -#define ORIENT_CCW_CL(a, b, c) (orientation(a, b, c) <= 0) -static double orientation(point_t *p1, point_t *p2, point_t *p3) -{ - return ((double)p2->pos.y - (double)p1->pos.y) * ((double)p3->pos.x - (double)p2->pos.x) - - ((double)p2->pos.x - (double)p1->pos.x) * ((double)p3->pos.y - (double)p2->pos.y); -} -#define LINES_INTERSECT(p1, q1, p2, q2) \ - (ORIENT_CCW(p1, q1, p2) != ORIENT_CCW(p1, q1, q2) && ORIENT_CCW(p2, q2, p1) != ORIENT_CCW(p2, q2, q1)) - cdt_t cdt; int main(void)