From: Matthew Fernandez Date: Mon, 31 May 2021 16:20:41 +0000 (-0700) Subject: abbreviate open coded fmax/fmin in limitBoxes X-Git-Tag: 2.47.3~10^2~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bd81e9a50a3ce7f3cf49e7750cf48ab7071a62e8;p=graphviz abbreviate open coded fmax/fmin in limitBoxes --- diff --git a/lib/common/routespl.c b/lib/common/routespl.c index 6c6f6846b..295461d80 100644 --- a/lib/common/routespl.c +++ b/lib/common/routespl.c @@ -346,10 +346,8 @@ limitBoxes (boxf* boxes, int boxn, const pointf *pps, int pn, int delta) * or graphs/directed/records.gv fails */ #define FUDGE .0001 if (sp[0].y <= boxes[bi].UR.y+FUDGE && sp[0].y >= boxes[bi].LL.y-FUDGE) { - if (boxes[bi].LL.x > sp[0].x) - boxes[bi].LL.x = sp[0].x; - if (boxes[bi].UR.x < sp[0].x) - boxes[bi].UR.x = sp[0].x; + boxes[bi].LL.x = fmin(boxes[bi].LL.x, sp[0].x); + boxes[bi].UR.x = fmax(boxes[bi].UR.x, sp[0].x); } } }