Difference between revisions of "RoundTo"

From Soldat Community Wiki
Jump to: navigation, search
(Created page with "===From the Scripting Manual=== ''function RoundTo(Number: extended; Decimals: integer): extended;'' '''Parameter Info:''' Number (Extendedl): Numeric value to round up/...")
 
 
Line 19: Line 19:
  
  
==External Links==
+
==See also==
* [http://enesce.com/help/index.html?Functions/RoundTo.html Scripting Manual page for RoundTo]
+
* [[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;


See also