Is there a better way (speed not needed, brevity and simplicity wanted) to achieve the following in less lines of code? (example below)
// Example //
/*
* Get Divisor For Number of Iterations - To Display Progress
*/
int fGetDivisor(int iMaxIters) {
int iDiv = 500; // init
if (iMaxIters >= 100000)
iDiv = 20000;
else if (iMaxIters > 20000)
iDiv = 10000;
else if (iMaxIters > 5000)
iDiv = 2000;
else if (iMaxIters > 2000)
iDiv = 1000;
return iDiv;
}