If you don't understand what I'm trying to say, read the pseudo code:
Code: Select all
// accumulator variable can change any time, to anything between 0 and 100
accumulator := ?
// start with the highest value, because it is only going to decrease
minAccumulator := 100
// reset variable can change any time to true or false
reset := false
while true:
// reset minAccumulator to default max 100
if reset:
minAccumulator := 100
reset := false
// if the current accumulator value is less then the last measured minimum accumulator value, then the minimum value will be the current one!
if accumulator < minAccumulator
minAccumulator := accumulator
