From f758cacc694a4051601c9d83d3381e1507c7f092 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Mon, 30 Aug 2010 20:56:44 +0900 Subject: [PATCH] Make FindEdge easier to read. --- tools/qfbsp/source/tjunc.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/tools/qfbsp/source/tjunc.c b/tools/qfbsp/source/tjunc.c index b2b958a64..9758e2f2d 100644 --- a/tools/qfbsp/source/tjunc.c +++ b/tools/qfbsp/source/tjunc.c @@ -169,26 +169,10 @@ FindEdge (vec3_t p1, vec3_t p2, vec_t *t1, vec_t *t2) h = HashVec (origin); for (w = wedge_hash[h]; w; w = w->next) { - temp = w->origin[0] - origin[0]; - if (temp < -EQUAL_EPSILON || temp > EQUAL_EPSILON) + if (!_VectorCompare (w->origin, origin)) continue; - temp = w->origin[1] - origin[1]; - if (temp < -EQUAL_EPSILON || temp > EQUAL_EPSILON) + if (!_VectorCompare (w->dir, dir)) continue; - temp = w->origin[2] - origin[2]; - if (temp < -EQUAL_EPSILON || temp > EQUAL_EPSILON) - continue; - - temp = w->dir[0] - dir[0]; - if (temp < -EQUAL_EPSILON || temp > EQUAL_EPSILON) - continue; - temp = w->dir[1] - dir[1]; - if (temp < -EQUAL_EPSILON || temp > EQUAL_EPSILON) - continue; - temp = w->dir[2] - dir[2]; - if (temp < -EQUAL_EPSILON || temp > EQUAL_EPSILON) - continue; - return w; }