Line data Source code
1 : #include "float.h"
2 : #include "int.h"
3 : #include "strings.h"
4 :
5 6 : void lengthFloat(const float number, uint32_t *numeratorLength, uint32_t *denominatorLength)
6 : {
7 6 : uint32_t numerator = (uint32_t)number;
8 6 : float denominator = number - (float)numerator ;
9 :
10 6 : *numeratorLength = lengthInt(numerator);
11 :
12 6 : char str[10] = {0};
13 6 : floatToString(denominator, str);
14 6 : *denominatorLength = lengthString(str) - 2;
15 6 : }
16 :
17 0 : float stringToFloat(char* str)
18 : {
19 0 : float value = 0.0;
20 0 : return value;
21 : }
|