This commit is contained in:
daid 2012-08-22 10:54:55 +02:00
parent 8c94ad0d26
commit 87ff61a8a6

View file

@ -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';