From: Matthew Fernandez Date: Sat, 22 May 2021 00:31:01 +0000 (-0700) Subject: remove commented out code in visibiilty.c X-Git-Tag: 2.47.3~27^2~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=272a5ab0f4f2918a38f3f3b431c118e40291be4e;p=graphviz remove commented out code in visibiilty.c --- diff --git a/lib/pathplan/visibility.c b/lib/pathplan/visibility.c index 75bc54f3e..98f6bc2ff 100644 --- a/lib/pathplan/visibility.c +++ b/lib/pathplan/visibility.c @@ -64,21 +64,6 @@ int wind(Ppoint_t a, Ppoint_t b, Ppoint_t c) return (w > .0001) ? 1 : ((w < -.0001) ? -1 : 0); } -#if 0 /* NOT USED */ -/* open_intersect: - * Returns true iff segment ab intersects segment cd. - * NB: segments are considered open sets - */ -static int open_intersect(Ppoint_t a, Ppoint_t b, Ppoint_t c, Ppoint_t d) -{ - return (((area2(a, b, c) > 0 && area2(a, b, d) < 0) || - (area2(a, b, c) < 0 && area2(a, b, d) > 0)) - && - ((area2(c, d, a) > 0 && area2(c, d, b) < 0) || - (area2(c, d, a) < 0 && area2(c, d, b) > 0))); -} -#endif - /* inBetween: * Return true if c is in (a,b), assuming a,b,c are collinear. */ @@ -183,23 +168,6 @@ static int in_cone(Ppoint_t a0, Ppoint_t a1, Ppoint_t a2, Ppoint_t b) return (m >= 0 || p >= 0); /* reflex at a */ } -#if 0 /* NOT USED */ -/* in_open_cone: - * Returns true iff point b is in the cone a0,a1,a2 - * NB: the cone is considered an open set - */ -static int in_open_cone(Ppoint_t a0, Ppoint_t a1, Ppoint_t a2, Ppoint_t b) -{ - int m = wind(b, a0, a1); - int p = wind(b, a1, a2); - - if (wind(a0, a1, a2) >= 0) - return (m > 0 && p > 0); /* convex at a */ - else - return (m > 0 || p > 0); /* reflex at a */ -} -#endif - /* dist2: * Returns the square of the distance between points a and b. */ @@ -395,7 +363,6 @@ int directVis(Ppoint_t p, int pp, Ppoint_t q, int qp, vconfig_t * conf) int V = conf->N; Ppoint_t *pts = conf->P; int *nextPt = conf->next; - /* int* prevPt = conf->prev; */ int k; int s1, e1; int s2, e2;