]> granicus.if.org Git - graphviz/commitdiff
replace some unnecessary MAX calls with fmax
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 27 Mar 2021 16:05:21 +0000 (09:05 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 3 Apr 2021 01:21:35 +0000 (18:21 -0700)
lib/ortho/maze.c

index c12dfa03c09b630e60affb581e3122b43941ee7a..fcf96bb623ae9d23a284d3535ebe12bd59f1a543 100644 (file)
@@ -13,6 +13,7 @@
 
 #define DEBUG
 
+#include <math.h>
 #include <stddef.h>
 #include <ortho/maze.h>
 #include <ortho/partition.h>
@@ -472,8 +473,8 @@ mkMaze (graph_t* g, int doLbls)
         bb.UR.y = ND_coord(n).y + h2;
        BB.LL.x = MIN(BB.LL.x, bb.LL.x);
        BB.LL.y = MIN(BB.LL.y, bb.LL.y);
-       BB.UR.x = MAX(BB.UR.x, bb.UR.x);
-       BB.UR.y = MAX(BB.UR.y, bb.UR.y);
+       BB.UR.x = fmax(BB.UR.x, bb.UR.x);
+       BB.UR.y = fmax(BB.UR.y, bb.UR.y);
         cp->bb = bb;
        cp->flags |= MZ_ISNODE;
         ND_alg(n) = cp;