min: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
m (Conversion script moved page Min to min: Converting page titles to lowercase)
No edit summary
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
      
      
|usage=
|usage=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
[h: smallest = min(num, num, ...)]
[h: smallest = min(num, num, ...)]
</source>
</syntaxhighlight>


|example=
|example=
<source lang="mtmacro" line>
<syntaxhighlight lang="mtmacro" line>
     [r: min(2, 4, 5, 1)]   
     [r: min(2, 4, 5, 1)]   
     [r: min(-1, -5, 100)]
     [r: min(-1, -5, 100)]
</source>
</syntaxhighlight>
Returns  
Returns  
     1
     1

Latest revision as of 23:59, 14 March 2023

min() Function

Returns the smallest of the numbers that are passed in.

Usage

[h: smallest = min(num, num, ...)]

Example

    [r: min(2, 4, 5, 1)]   
    [r: min(-1, -5, 100)]

Returns

   1
-5