10 years ago.

Doubts

Doubts about lines:

reading = min;

and

reading = max;

Would not correct :

min = reading;

and

max = reading;

Question relating to:

1 Answer

10 years ago.

No. Those lines are to ensure that the reading is within the expected range not to set the max and min values. It is expected that the max and min have already been set correctly.