]> granicus.if.org Git - graphviz/commitdiff
neatogen _neato_set_aspect: replace 'MIN' with its stdlib equivalent
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 3 Dec 2022 21:10:53 +0000 (13:10 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 3 Dec 2022 21:10:53 +0000 (13:10 -0800)
lib/neatogen/neatosplines.c

index 2030e45f4c79adffa5cf6965047c8bb7f90e6e7a..b0c9fffd235d255ef94abf61058652abb76a96f3 100644 (file)
@@ -12,6 +12,7 @@
 #include "config.h"
 #include <cgraph/alloc.h>
 #include <cgraph/unreachable.h>
+#include <math.h>
 #include <neatogen/neato.h>
 #include <neatogen/adjust.h>
 #include <pathplan/pathplan.h>
@@ -1022,7 +1023,7 @@ static bool _neato_set_aspect(graph_t * g)
            xf = (double) GD_drawing(g)->size.x / GD_bb(g).UR.x;
            yf = (double) GD_drawing(g)->size.y / GD_bb(g).UR.y;
            if (xf > 1.0 && yf > 1.0) {
-               double scale = MIN(xf, yf);
+               double scale = fmin(xf, yf);
                xf = yf = scale;
            } else
                return translated;