hedgewars/uFloat.pas
changeset 6443 23364a5fcc86
parent 6415 af2047bb4f70
child 6498 5678806aafca
equal deleted inserted replaced
6442:e6e409d9d6db 6443:23364a5fcc86
   320 var tmpstr: shortstring;
   320 var tmpstr: shortstring;
   321 begin
   321 begin
   322 str(z.Round, cstr);
   322 str(z.Round, cstr);
   323 if z.Frac <> 0 then
   323 if z.Frac <> 0 then
   324    begin
   324    begin
   325    str(z.Frac / $100000000:1:10, tmpstr);
   325    str(z.Frac / $100000000, tmpstr);
   326    delete(tmpstr, 1, 2);
   326    delete(tmpstr, 1, 2);
   327    cstr:= cstr + '.' + tmpstr
   327    cstr:= cstr + '.' + copy(tmpstr, 1, 10)
   328    end;
   328    end;
   329 if z.isNegative then cstr:= '-' + cstr
   329 if z.isNegative then cstr:= '-' + cstr
   330 end;
   330 end;
   331 
   331 
   332 function hwRound(const t: hwFloat): LongInt;
   332 function hwRound(const t: hwFloat): LongInt;