Arma 3 Scripting

Function in Arrays

BIS_fnc_maxDiffArray

Also available as Markdown and JSON, or read the original wiki page.

Description

Function to return the maximum difference between all values in an array.

Syntax

[arrayOfNumbers] call BIS_fnc_maxDiffArray

Parameters:

Returns: Number - the biggest difference

Examples

Example 1

private _maxDiff = [[0, 5, 10, -5]] call BIS_fnc_maxDiffArray; // will return 15 (-5 to 10)