a simple way to do this is to constant compare the present value with
the low value and the high value.

if the current value is lower than the the min value, then the min
value is changed to the current value.

Same for the max value.

Just initialize the min value with +infinity and the max value with
-infinity.

Reply via email to