From: Matthew Fernandez Date: Sun, 6 Mar 2022 23:04:32 +0000 (-0800) Subject: commit get_gradient_points: rephrase an open coded 'hypot' X-Git-Tag: 4.0.0~185^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2e69714168e30e00c7deb99c3a7019b78fb04e79;p=graphviz commit get_gradient_points: rephrase an open coded 'hypot' --- diff --git a/lib/common/utils.c b/lib/common/utils.c index 310f4988f..85870bbfa 100644 --- a/lib/common/utils.c +++ b/lib/common/utils.c @@ -1773,8 +1773,7 @@ void get_gradient_points(pointf *A, pointf *G, int n, double angle, int flags) { center.y = min.y + (max.y - min.y)/2; if (isRadial) { double inner_r, outer_r; - outer_r = sqrt((center.x - min.x)*(center.x - min.x) + - (center.y - min.y)*(center.y - min.y)); + outer_r = hypot(center.x - min.x, center.y - min.y); inner_r = outer_r /4.; if (isRHS) { G[0].y = center.y;