From: Matthew Fernandez Date: Mon, 26 Dec 2022 21:45:48 +0000 (-0800) Subject: sparse QuadTree_new_from_point_list: rephrase conditional assignment as 'fmax' X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0e2e296e795fee5b2fa4ac28a5eaded3c6ed58fd;p=graphviz sparse QuadTree_new_from_point_list: rephrase conditional assignment as 'fmax' Avoids a -Wfloat-equal warning. --- diff --git a/lib/sparse/QuadTree.c b/lib/sparse/QuadTree.c index 4e1692652..1c5b16019 100644 --- a/lib/sparse/QuadTree.c +++ b/lib/sparse/QuadTree.c @@ -370,7 +370,7 @@ QuadTree QuadTree_new_from_point_list(int dim, int n, int max_level, double *coo center[i] = (xmin[i] + xmax[i])*0.5; width = MAX(width, xmax[i] - xmin[i]); } - if (width == 0) width = 0.00001;/* if we only have one point, width = 0! */ + width = fmax(width, 0.00001);/* if we only have one point, width = 0! */ width *= 0.52; qt = QuadTree_new(dim, center, width, max_level);