10.11.2015, 21:00
Do not switch through large ranges. The compiler can't optimize this. I don't think you can use floating point numbers, either. You could try something like:
PHP код:
bonus = 4;
if(var > 60000) { bonus--; }
if(var > 70000) { bonus--; }
if(var > 90000) { bonus--; }