From: Matthew Fernandez Date: Fri, 18 Jun 2021 01:19:03 +0000 (-0700) Subject: abbreviate an open coded fmax in doRep X-Git-Tag: 2.48.0~43^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9ae1b66bcc685d6cbf0d1d706b4f8ce7cfaf2461;p=graphviz abbreviate an open coded fmax in doRep --- diff --git a/lib/fdpgen/xlayout.c b/lib/fdpgen/xlayout.c index fa9177662..fd8035d0b 100644 --- a/lib/fdpgen/xlayout.c +++ b/lib/fdpgen/xlayout.c @@ -262,9 +262,7 @@ doRep(node_t * p, node_t * q, double xdelta, double ydelta, double dist2) dist2 = xdelta * xdelta + ydelta * ydelta; } #if defined(MS) - dout = boxDist(p, q); - if (dout < EPSILON) - dout = EPSILON; + dout = fmax(boxDist(p, q), EPSILON); dist = sqrt(dist2); force = K2 / (dout * dist); #elif defined(ALT)