From 11a70d3e129d51ec94025e348d81c60c42c7b72d Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 6 Mar 2022 15:05:54 -0800 Subject: [PATCH] fdpgen dumpstat: rephrase an open coded 'hypot' --- lib/fdpgen/tlayout.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/fdpgen/tlayout.c b/lib/fdpgen/tlayout.c index 86155b541..ea5b847ea 100644 --- a/lib/fdpgen/tlayout.c +++ b/lib/fdpgen/tlayout.c @@ -30,6 +30,7 @@ #ifdef HAVE_SYS_TYPES_H #include #endif +#include #include #include #ifndef _WIN32 @@ -645,7 +646,7 @@ void dumpstat(graph_t * g) dx = ND_pos(np)[0] - ND_pos(aghead(ep))[0]; dy = ND_pos(np)[1] - ND_pos(aghead(ep))[1]; fprintf(stderr, " %s -- %s (%f)\n", agnameof(np), - agnameof(aghead(ep)), sqrt(dx * dx + dy * dy)); + agnameof(aghead(ep)), hypot(dx, dy)); } } } -- 2.40.0