just remove the
round to get the decimal
Code:
Function NumToStr(Float: Extended): String;
Begin
Result:= Format('%.3n', [Float]); StringChange(Result, ',', '.');
while ((Result[Length(Result)] = '0') or (Result[Length(Result)] = '.')) and (Pos('.', Result) > 0) do
SetLength(Result, Length(Result));
End;
Function MbOrTb(Byte: Extended): String;
begin
if Byte < 1024 then Result:= NumToStr(Byte) + ' MB' else
if Byte/1024 < 1024 then Result:= NumToStr((Byte/1024*100)/100) + ' GB' else
Result:= NumToStr(((Byte/(1024*1024))*100)/100) + ' TB'
end;
18600 mb = 18.164 gb