BIS fnc maxDiffArray: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - " |GROUP1 ____________________________________________________________________________________________" to " |GROUP1= ____________________________________________________________________________________________") |
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
||
Line 1: | Line 1: | ||
{{Function|Comments= | {{Function|Comments= | ||
| arma2 |Game name= | | arma2 |Game name= | ||
Line 7: | Line 6: | ||
|gr1= Arrays |GROUP1= | |gr1= Arrays |GROUP1= | ||
| Function to return the maximum difference between all values in an array. |DESCRIPTION= | | Function to return the maximum difference between all values in an array. |DESCRIPTION= | ||
| [arrayOfNumbers] call [[BIS_fnc_maxDiffArray]] |SYNTAX= | | [arrayOfNumbers] call [[BIS_fnc_maxDiffArray]] |SYNTAX= | ||
Line 17: | Line 14: | ||
| [[Number]] - the biggest difference |RETURNVALUE= | | [[Number]] - the biggest difference |RETURNVALUE= | ||
|x1= <code>_maxDiff = [<nowiki/>[0, 5, 10, -5]] [[call]] [[BIS_fnc_maxDiffArray]]; {{codecomment|// will return 15 (-5 to 10)}}</code> |EXAMPLE1= | |x1= <code>_maxDiff = [<nowiki/>[0, 5, 10, -5]] [[call]] [[BIS_fnc_maxDiffArray]]; {{codecomment|// will return 15 (-5 to 10)}}</code> |EXAMPLE1= | ||
| |SEEALSO= | | |SEEALSO= |
Revision as of 23:21, 16 January 2021
Description
- Description:
- Function to return the maximum difference between all values in an array.
- Execution:
- call
- Groups:
- Arrays
Syntax
- Syntax:
- [arrayOfNumbers] call BIS_fnc_maxDiffArray
- Parameters:
- arrayOfNumbers: Array - numbers to be tested
- Return Value:
- Number - the biggest difference
Examples
- Example 1:
_maxDiff = [[0, 5, 10, -5]] call BIS_fnc_maxDiffArray; // will return 15 (-5 to 10)
Additional Information
- See also:
- See also needed
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