From: Matthew Fernandez Date: Sun, 6 Mar 2022 23:00:07 +0000 (-0800) Subject: neatogen ideal_distance_avoid_overlap: rephrase an open coded 'hypot' X-Git-Tag: 4.0.0~185^2~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7650481dde8a3dd619abf6dfc9c861cefee2f812;p=graphviz neatogen ideal_distance_avoid_overlap: rephrase an open coded 'hypot' --- diff --git a/lib/neatogen/overlap.c b/lib/neatogen/overlap.c index f94b24343..1522aa1b2 100644 --- a/lib/neatogen/overlap.c +++ b/lib/neatogen/overlap.c @@ -47,7 +47,7 @@ static void ideal_distance_avoid_overlap(int dim, SparseMatrix A, double *x, dou wx = width[i*dim]+width[jj*dim]; wy = width[i*dim+1]+width[jj*dim+1]; if (dx < MACHINEACC*wx && dy < MACHINEACC*wy){ - ideal_distance[j] = sqrt(wx*wx+wy*wy); + ideal_distance[j] = hypot(wx, wy); *tmax = 2; } else { if (dx < MACHINEACC*wx){