]> granicus.if.org Git - graphviz/commitdiff
neatogen: use '-FLT_MAX' as a sentinel instead of '-MAXFLOAT'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 12 Feb 2022 03:15:55 +0000 (14:15 +1100)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 15 Feb 2022 07:32:15 +0000 (18:32 +1100)
This seems a more correct/appropriate way of achieving this in C99.

lib/neatogen/multispline.c

index 43e66ee88bbbdc29fadc099e14e9bddd1d0d20d1..7d9fc3db93de4a18c6ef53e66ba5823a97a7ecf2 100644 (file)
@@ -8,6 +8,7 @@
  * Contributors: Details at https://graphviz.org
  *************************************************************************/
 
+#include <float.h>
 #include <neatogen/multispline.h>
 #include <neatogen/delaunay.h>
 #include <neatogen/neatoprocs.h>
@@ -1277,7 +1278,7 @@ typedef struct {
 
 #define N_DAD(n) dad[n]
 #define E_WT(e) (e->dist)
-#define UNSEEN -MAXFLOAT
+#define UNSEEN (-FLT_MAX)
 
 /* triPath:
  * Find the shortest path with lengths in g from