From: Matthew Fernandez Date: Sat, 28 Jan 2023 16:22:47 +0000 (-0800) Subject: mm2gv makeDotGraph: replace 'MAX', 'MIN' with standard 'fmax', 'fmin' X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=01d45327a7b46e69b1a44307e0527dd26a88bcd2;p=graphviz mm2gv makeDotGraph: replace 'MAX', 'MIN' with standard 'fmax', 'fmin' --- diff --git a/cmd/tools/mm2gv.c b/cmd/tools/mm2gv.c index 3e97a3656..c452f8c2c 100644 --- a/cmd/tools/mm2gv.c +++ b/cmd/tools/mm2gv.c @@ -149,10 +149,10 @@ static Agraph_t *makeDotGraph(SparseMatrix A, char *name, int dim, mindist = color[j]; first = FALSE; } else { - mindist = MIN(mindist, color[j]); + mindist = fmin(mindist, color[j]); } } - maxdist = MAX(color[j], maxdist); + maxdist = fmax(color[j], maxdist); } } else { for (j = ia[i]; j < ia[i + 1]; j++) { @@ -163,17 +163,17 @@ static Agraph_t *makeDotGraph(SparseMatrix A, char *name, int dim, mindist = color[j]; first = FALSE; } else { - mindist = MIN(mindist, color[j]); + mindist = fmin(mindist, color[j]); } } - maxdist = MAX(color[j], maxdist); + maxdist = fmax(color[j], maxdist); } } } for (n = agfstnode(g); n; n = agnxtnode(g, n)) { i = ND_id(n); for (j = ia[i]; j < ia[i + 1]; j++) { - color[j] = (color[j] - mindist) / MAX(maxdist - mindist, 0.000001); + color[j] = (color[j] - mindist) / fmax(maxdist - mindist, 0.000001); } } }