Add Code One support

This commit is contained in:
hooper114 2009-07-04 20:48:42 +00:00
parent 7ad339627c
commit 2145673ce4
12 changed files with 1417 additions and 10 deletions

View file

@ -259,3 +259,24 @@ int roundup(float input)
return integer_part;
}
int istwodigits(unsigned char source[], int position)
{
if((source[position] >= '0') && (source[position] <= '9')) {
if((source[position + 1] >= '0') && (source[position + 1] <= '9')) {
return 1;
}
}
return 0;
}
float froundup(float input)
{
float fraction, output = 0.0;
fraction = input - (int)input;
if(fraction > 0.01) { output = (input - fraction) + 1.0; } else { output = input; }
return output;
}