From: Matthew Fernandez Date: Sun, 6 Mar 2022 22:52:55 +0000 (-0800) Subject: tclpathplan distance: rephrase an open coded 'hypot' X-Git-Tag: 4.0.0~185^2~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4401e47673aadf37290d77d9de90e3ec2b211890;p=graphviz tclpathplan distance: rephrase an open coded 'hypot' --- diff --git a/tclpkg/tclpathplan/tclpathplan.c b/tclpkg/tclpathplan/tclpathplan.c index 3eec7279a..479392f50 100644 --- a/tclpkg/tclpathplan/tclpathplan.c +++ b/tclpkg/tclpathplan/tclpathplan.c @@ -283,7 +283,7 @@ static double distance(point p, point q) dx = p.x - q.x; dy = p.y - q.y; - return sqrt(dx * dx + dy * dy); + return hypot(dx, dy); } static point rotate(point c, point p, double alpha)