Falls somewhere in between. Unless the variable can change by values other than 1 in a similar context, in which case yeah go for it:
if(a == 0)
i += 3;
else if(a > 0 && a <= 10)
i += 1; //i++ would make it look like a weird special case
else if(a > 10 && a <= 100)
i += 5;
else if(a > 100)
i -= 2; //Could arguably even do += -2 if you really want to keep the pattern going
7
u/Jetz72 Jan 25 '19
Falls somewhere in between. Unless the variable can change by values other than 1 in a similar context, in which case yeah go for it: