be careful, the first comment is turned off to avoid an infinite loop, It was starting at .009999999999999983
then I multiplied the changeDue
in the drawer thinking maybe decimal places were throwing off the conditions of the case switch(true)
then I was hitting the infinite loop at .50
and after trying to clean up the code a bit, now it occurs at 1
I’m testing the other commented test cases to see if and where they might encounter the same snag
(For the sake of anyone following along that may be confused:)
checking for > meant there was no case in which the value 1 had a true case. The appropriate action is to change all cases to be >= matches (or alternatively, subtract 1 from each of the case-value numbers and retain the >).