NOW printFloat probably works
This commit is contained in:
parent
a7c13c497a
commit
903303579f
2
print.c
2
print.c
@ -81,7 +81,7 @@ void printFloat(double n)
|
|||||||
serial_write('.');
|
serial_write('.');
|
||||||
fractional_part *= 10;
|
fractional_part *= 10;
|
||||||
int decimals = DECIMAL_PLACES;
|
int decimals = DECIMAL_PLACES;
|
||||||
while(decimals > 0) {
|
while(decimals-- > 0) {
|
||||||
decimal_part = floor(fractional_part);
|
decimal_part = floor(fractional_part);
|
||||||
printDigit(decimal_part);
|
printDigit(decimal_part);
|
||||||
fractional_part -= decimal_part;
|
fractional_part -= decimal_part;
|
||||||
|
Loading…
Reference in New Issue
Block a user