Skip to content

Commit 8a47b5c

Browse files
committedFeb 29, 2016
Correct initialization of Max
FLT_MIN is the smallest positive float
1 parent e097d6e commit 8a47b5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/analysis/vector/qgszonalstatistics.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class ANALYSIS_EXPORT QgsZonalStatistics
6767
{
6868
reset();
6969
}
70-
void reset() { sum = 0; count = 0; max = FLT_MIN; min = FLT_MAX; valueCount.clear(); values.clear(); }
70+
void reset() { sum = 0; count = 0; max = -FLT_MAX; min = FLT_MAX; valueCount.clear(); values.clear(); }
7171
void addValue( float value, double weight = 1.0 )
7272
{
7373
if ( weight < 1.0 )

0 commit comments

Comments
 (0)
Please sign in to comment.