BIS_fnc_nearestNum
- Arma 3 v0.50
- First in Arma 2 v1.00
Function · also in Math · Markdown · JSON · original wiki page
Description
Returns the provided set closest number to the target number.
Syntax
[values, value] call BIS_fnc_nearestNum
Parameters:
Returns: Number - the closest value
Examples
Example 1
private _closestValueTo4 = [[1,5,10], 4] call BIS_fnc_nearestNum; // returns 5