Difference between revisions of "RoundTo"
(Created page with "===From the Scripting Manual=== ''function RoundTo(Number: extended; Decimals: integer): extended;'' '''Parameter Info:''' Number (Extendedl): Numeric value to round up/...") |
Tehbugerz0r (talk | contribs) |
||
Line 19: | Line 19: | ||
− | == | + | ==See also== |
− | * [ | + | * [[Round]] |
[[Category:Server Scripting]][[Category:Server Scripting Functions]] | [[Category:Server Scripting]][[Category:Server Scripting Functions]] |
Latest revision as of 08:03, 25 March 2013
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;