That does not make any sense. count >.99 is always > .1&& count>=.99 && count>=.10000000000000003)
My pseudo code did NOT test for both boundaries at the same time.
While incrementing >> check for the upper boundary
while decrementing >> check for the lower boundary
The code is incrementing when incrementCount is true
The code is decrementing when incrementCount is false
When the code reaches the upper boundary set incrementCount so it will start decrementing ie set it false
When the code reaches the lower boundary do nothing and leave count's value at the lower value