RoundTo
Revision as of 08:03, 25 March 2013 by Tehbugerz0r (talk | contribs)
From the Scripting Manual
function RoundTo(Number: extended; Decimals: integer): extended; Parameter Info: Number (Extendedl): Numeric value to round up/down. Usually a float value Decimals (Integer): Amount of decimal places to return. Description: This function will return the rounded up/down value of parameter 'Number' with decimal places.
Examples
var
MyDub: double;
begin
MyDub := 553.5484842;
WriteLn(floattostr(RoundTo(MyDub,2))); //553.55
end;