SyntaxFix
Write A Post
Hire A Developer
Questions
variation on Anton's answer:
// cut down the number of divisions (assuming i is positive & 32 bits) if (i >= 100000000) i /= 100000000; if (i >= 10000) i /= 10000; if (i >= 100) i /= 100; if (i >= 10) i /= 10;