max: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(New page: ==Function max== Returns the largest number of all the numbers that have been passed n. ===Usage=== <source lang="mtmacro" line> [h: largest = max(num, num, ...)] </source> ===Examples...)
 
No edit summary
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
==Function max==
{{MacroFunction
Returns the largest number of all the numbers that have been passed n.
|name=max
|description=
Returns the largest number of all the numbers that have been passed in.


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


 
|examples=
 
<syntaxhighlight lang="mtmacro" line>
===Examples===
<source 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
     -2
     -2
}}
[[Category:Mathematical Function]]

Latest revision as of 23:59, 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