Fix for #201
This commit is contained in:
parent
8c94ad0d26
commit
87ff61a8a6
1 changed files with 2 additions and 2 deletions
|
@ -2967,7 +2967,7 @@ char *itostr4(const int &xx)
|
||||||
// convert float to string with +1234.5 format
|
// convert float to string with +1234.5 format
|
||||||
char *ftostr51(const float &x)
|
char *ftostr51(const float &x)
|
||||||
{
|
{
|
||||||
int xx=x*10;
|
long xx=x*10;
|
||||||
conv[0]=(xx>=0)?'+':'-';
|
conv[0]=(xx>=0)?'+':'-';
|
||||||
xx=abs(xx);
|
xx=abs(xx);
|
||||||
conv[1]=(xx/10000)%10+'0';
|
conv[1]=(xx/10000)%10+'0';
|
||||||
|
@ -2983,7 +2983,7 @@ char *ftostr51(const float &x)
|
||||||
// convert float to string with +123.45 format
|
// convert float to string with +123.45 format
|
||||||
char *ftostr52(const float &x)
|
char *ftostr52(const float &x)
|
||||||
{
|
{
|
||||||
int xx=x*100;
|
long xx=x*100;
|
||||||
conv[0]=(xx>=0)?'+':'-';
|
conv[0]=(xx>=0)?'+':'-';
|
||||||
xx=abs(xx);
|
xx=abs(xx);
|
||||||
conv[1]=(xx/10000)%10+'0';
|
conv[1]=(xx/10000)%10+'0';
|
||||||
|
|
Reference in a new issue