numlen(0) == 1

master
Mikkel Oscar Lyderik 9 years ago
parent 2707be7199
commit c8cf3f70f9

@ -8,7 +8,7 @@ int wrap(int i, int max) {
int numlen(int n) {
if (n == 0) {
return n;
return 1;
}
return log10(n) + 1;
}

Loading…
Cancel
Save