]> granicus.if.org Git - graphviz/commitdiff
neatogen parseFactor: replace 'MIN' and 'MAX' with stdlib equivalents
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 19 Nov 2022 23:11:35 +0000 (15:11 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 25 Nov 2022 18:30:51 +0000 (10:30 -0800)
lib/neatogen/adjust.c

index cf7bbaf029c70e5be5f9345f46b35e2ee74a7683..3f54ee48480602140fd326519e51dc01e32b1a1f 100644 (file)
@@ -1209,12 +1209,12 @@ parseFactor (char* s, expand_t* pp, float sepfact, float dflt)
        if (i == 1) y = x;
        if (pp->doAdd) {
            if (sepfact > 1) {
-               pp->x = MIN(dflt,x/sepfact);
-               pp->y = MIN(dflt,y/sepfact);
+               pp->x = fminf(dflt, x/sepfact);
+               pp->y = fminf(dflt, y/sepfact);
            }
            else if (sepfact < 1) {
-               pp->x = MAX(dflt,x/sepfact);
-               pp->y = MAX(dflt,y/sepfact);
+               pp->x = fmaxf(dflt, x/sepfact);
+               pp->y = fmaxf(dflt, y/sepfact);
            }
            else {
                pp->x = x;