From: Matthew Fernandez Date: Fri, 18 Jun 2021 00:56:42 +0000 (-0700) Subject: replace an open coded hypotenuse calculation in dist with a call to hypot X-Git-Tag: 2.48.0~43^2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=27cc6012192b5b75c7a0399c45cefc16ae6b432b;p=graphviz replace an open coded hypotenuse calculation in dist with a call to hypot Similar to the previous commit. --- diff --git a/lib/fdpgen/xlayout.c b/lib/fdpgen/xlayout.c index 03560fc25..fe784a766 100644 --- a/lib/fdpgen/xlayout.c +++ b/lib/fdpgen/xlayout.c @@ -118,7 +118,7 @@ static double dist(pointf p, pointf q) dx = p.x - q.x; dy = p.y - q.y; - return sqrt(dx * dx + dy * dy); + return hypot(dx, dy); } /* bBox: