max: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Added MacroFunction template and Mathematical Function category)
No edit summary
 
(2 intermediate revisions by one other user not shown)
Line 5: Line 5:


|usage=
|usage=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[h: largest = max(num, num, ...)]
[h: largest = max(num, num, ...)]
</source>
</syntaxhighlight>


|examples=
|examples=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
     [r: max(2, 30, 4, 7)]
     [r: max(2, 30, 4, 7)]
     [r: max(-2, -40, -100)]
     [r: max(-2, -40, -100)]
</source>
</syntaxhighlight>
Returns  
Returns  
     30
     30

Latest revision as of 23:10, 14 March 2023

max() Function

Returns the largest number of all the numbers that have been passed in.

Usage

[h: largest = max(num, num, ...)]

Examples

    [r: max(2, 30, 4, 7)]
    [r: max(-2, -40, -100)]

Returns

   30
-2