]> granicus.if.org Git - graphviz/commitdiff
neatogen scan_graph_mode: swap 'MAX' call for standard 'fmax'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 8 Sep 2022 00:27:49 +0000 (17:27 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 29 Jan 2023 21:27:37 +0000 (13:27 -0800)
lib/neatogen/stuff.c

index bb25513ef7bf38a82ffd8890ad93243456d79e6a..aaa7ff8f8f31609f616b3bbbeed2bc23adb36618 100644 (file)
@@ -11,6 +11,7 @@
 
 #include "config.h"
 #include       <cgraph/alloc.h>
+#include       <math.h>
 #include       <neatogen/neato.h>
 #include       <neatogen/stress.h>
 #include       <time.h>
@@ -277,7 +278,7 @@ int scan_graph_mode(graph_t * G, int mode)
 
     str = agget(G, "defaultdist");
     if (str && str[0])
-       Initial_dist = MAX(Epsilon, atof(str));
+       Initial_dist = fmax(Epsilon, atof(str));
     else
        Initial_dist = total_len / (nE > 0 ? nE : 1) * sqrt(nV) + 1;