max: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl> " to "")
m (Some wiki formatting)
 
(18 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:Scripting Commands|MAX]]
{{RV|type=command
{{GameCategory|arma1|Scripting Commands}}
{{Command|Comments=


| arma1 |Game name=
|game1= arma1
|version1= 1.00


|1.00|Game version=
|game2= arma2
|version2= 1.00


|gr1= Math |GROUP1=
|game3= arma2oa
|version3= 1.50


| The greater of a,b |DESCRIPTION=
|game4= tkoh
|version4= 1.00


| [[Number]] <nowiki>=</nowiki> a '''max''' b |SYNTAX=
|game5= arma3
|version5= 0.50


|p1= a: [[Number]] |PARAMETER1=
|gr1= Math
|p2= b: [[Number]] |PARAMETER2=


| [[Number]] |RETURNVALUE=
|descr= The greater value of a and b.
 
|x1= <code>3 '''max''' 2</code>


Result is 3 |EXAMPLE1=
|s1= a [[max]]  b


| [[min]], [[selectMin]], [[selectMax]], [[ceil]], [[floor]], [[linearConversion]], [[Math Commands]] |SEEALSO=
|p1= a: [[Number]]


|p2= b: [[Number]]
|r1= [[Number]]
|x1= <sqf>3 max 2; // Result is 3</sqf>
|x2= <sqf>-3 max -2; // Result is -2</sqf>
|seealso= [[min]] [[selectMin]] [[selectMax]] [[ceil]] [[floor]] [[linearConversion]] [[Math Commands]]
}}
}}
<h3 style="display:none">Bottom Section</h3>
{{GameCategory|arma2|Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
{{GameCategory|tkoh|Scripting Commands}}

Latest revision as of 16:20, 13 May 2022

Hover & click on the images for description

Description

Description:
The greater value of a and b.
Groups:
Math

Syntax

Syntax:
a max b
Parameters:
a: Number
b: Number
Return Value:
Number

Examples

Example 1:
3 max 2; // Result is 3
Example 2:
-3 max -2; // Result is -2

Additional Information

See also:
min selectMin selectMax ceil floor linearConversion Math Commands

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note