From: Matthew Fernandez Date: Sun, 6 Mar 2022 22:59:15 +0000 (-0800) Subject: pathplan dist: rephrase an open coded 'hypot' X-Git-Tag: 4.0.0~185^2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=abe22c838fb7b2f2cd4cd770a357d626a0c6df2f;p=graphviz pathplan dist: rephrase an open coded 'hypot' --- diff --git a/lib/pathplan/route.c b/lib/pathplan/route.c index 7857e2c9b..ac81eabd0 100644 --- a/lib/pathplan/route.c +++ b/lib/pathplan/route.c @@ -436,7 +436,7 @@ static double dist(Ppoint_t p1, Ppoint_t p2) double dx, dy; dx = p2.x - p1.x, dy = p2.y - p1.y; - return sqrt(dx * dx + dy * dy); + return hypot(dx, dy); } static Ppoint_t scale(Ppoint_t p, double c)