Go to the documentation of this file. 37 #define LARGE_DISTANCE 100000 38 #define MIN_BLOB_SIZE 10 39 #define MAX_ASPECT_RATIO 2.5 50 #define same_point(p1,p2) \ 51 ((abs (p1.x - p2.x) < chop_same_distance) && \ 52 (abs (p1.y - p2.y) < chop_same_distance)) 61 #define dist_square(p1,p2) \ 62 ((p2.x - p1.x) * (p2.x - p1.x) + \ 63 (p2.y - p1.y) * (p2.y - p1.y)) 72 #define closest(test_p,p1,p2) \ 75 ((dist_square (test_p->pos, p1->pos) < \ 76 dist_square (test_p->pos, p2->pos)) ? \ 88 #define edgept_dist(p1,p2) \ 89 (dist_square ((p1)->pos, (p2)->pos)) 98 #define is_exterior_point(edge,point) \ 99 (same_point (edge->prev->pos, point->pos) || \ 100 same_point (edge->next->pos, point->pos) || \ 101 (angle_change (edge->prev, edge, edge->next) - \ 102 angle_change (edge->prev, edge, point) > 20)) 110 #define is_equal(p1,p2) \ 111 (((p1).x == (p2).x) && ((p1).y == (p2).y)) 121 #define is_on_line(p,p0,p1) \ 122 (within_range ((p).x, (p0).x, (p1).x) && \ 123 within_range ((p).y, (p0).y, (p1).y)) 132 #define within_range(x,x0,x1) \ 133 (((x0 <= x) && (x <= x1)) || ((x1 <= x) && (x <= x0)))