Difference between revisions of "Round"

From Soldat Community Wiki
Jump to: navigation, search
(Created page with "===From the Scripting Manual=== ''function round(Number: real): integer;'' '''Parameter Info:''' Number (Real): Numeric value to round up/down. '''Description:''' T...")
 
 
Line 21: Line 21:
  
  
==External Links==
+
==See also==
* [http://enesce.com/help/index.html?Functions/round.html Scripting Manual page for round]
+
* [[RoundTo]]
  
 
[[Category:Server Scripting]][[Category:Server Scripting Functions]]
 
[[Category:Server Scripting]][[Category:Server Scripting Functions]]

Latest revision as of 08:02, 25 March 2013

From the Scripting Manual

function round(Number: real): integer;

Parameter Info:
 Number (Real): Numeric value to round up/down.

Description:
 This function will return the rounded up/down value of parameter 'Number'

Examples

var
MyDub: double;
MyInt: integer;
begin
    MyDub := 553.55;
    MyInt := 42;
    WriteLn(inttostr(round(MyInt))); //42
    WriteLn(inttostr(round(MyDub))); //554
end;


See also