From 2e69714168e30e00c7deb99c3a7019b78fb04e79 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 6 Mar 2022 15:04:32 -0800 Subject: [PATCH] commit get_gradient_points: rephrase an open coded 'hypot' --- lib/common/utils.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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; -- 2.40.0