From 1bb499e3b01014a7f823b7290fd0c5aeb72ee0be Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Thu, 9 Sep 2021 17:57:07 -0700 Subject: [PATCH] geomUpdate: rephrase and condense some open coded fmax/fmin --- lib/neatogen/adjust.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/neatogen/adjust.c b/lib/neatogen/adjust.c index d7db933de..489698dd2 100644 --- a/lib/neatogen/adjust.c +++ b/lib/neatogen/adjust.c @@ -236,10 +236,8 @@ static void geomUpdate(int doSort) xmin = sites[0]->coord.x; xmax = sites[0]->coord.x; for (i = 1; i < nsites; i++) { - if (sites[i]->coord.x < xmin) - xmin = sites[i]->coord.x; - if (sites[i]->coord.x > xmax) - xmax = sites[i]->coord.x; + xmin = fmin(xmin, sites[i]->coord.x); + xmax = fmax(xmax, sites[i]->coord.x); } ymin = sites[0]->coord.y; ymax = sites[nsites - 1]->coord.y; -- 2.40.0