From 3060d089df6730be78e50949eda5e728959c997d Mon Sep 17 00:00:00 2001 From: Valerio Mariani Date: Wed, 25 Apr 2018 17:51:41 +0200 Subject: Use max and mix float values to initialize variables --- libcrystfel/src/peakfinder8.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libcrystfel') diff --git a/libcrystfel/src/peakfinder8.c b/libcrystfel/src/peakfinder8.c index 3747fda6..f96750de 100644 --- a/libcrystfel/src/peakfinder8.c +++ b/libcrystfel/src/peakfinder8.c @@ -32,6 +32,7 @@ #include #endif +#include #include #include @@ -399,8 +400,8 @@ static void compute_radial_stats(float *rthreshold, if ( rcount[ri] == 0 ) { roffset[ri] = 0; rsigma[ri] = 0; - rthreshold[ri] = 1e9; - lthreshold[ri] = -1e9; + rthreshold[ri] = FLT_MAX; + lthreshold[ri] = FLT_MIN; } else { this_offset = roffset[ri] / rcount[ri]; this_sigma = rsigma[ri] / rcount[ri] - (this_offset * this_offset); -- cgit v1.2.3