]> granicus.if.org Git - graphviz/commitdiff
topfish DIST: rephrase an open coded 'hypot'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 6 Mar 2022 22:51:28 +0000 (14:51 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 9 Mar 2022 07:33:29 +0000 (23:33 -0800)
lib/topfish/rescale_layout.c

index 30c763e1fb64f07657e1adc6b4fa0005e553f8f9..7d62b7c690a4012fa40e2d773dee203485a3fd40 100644 (file)
@@ -315,7 +315,7 @@ rescale_layout(double *x_coords, double *y_coords,
     }
 }
 
-#define DIST(x1,y1,x2,y2) (sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)))
+#define DIST(x1, y1, x2, y2) hypot((x1) - (x2), (y1) - (y2))
 
 static void
 rescale_layout_polarFocus(v_data * graph, int n,