Arma 3 Scripting

Function in Math

BIS_fnc_randomInt

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

Description

Returns a random integer between the two passed numbers (inclusive). The order of parameters doesn't matter: it can be [min, max] or [max, min].

Syntax

[min, max] call BIS_fnc_randomInt

Parameters:

Returns: Number

Examples

Example 1

[1, 3] call BIS_fnc_randomInt; // will return 1, 2 or 3

See also

BIS_fnc_randomNum · BIS_fnc_arithmeticMean · BIS_fnc_geometricMean · BIS_fnc_nearestNum · BIS_fnc_sortNum · BIS_fnc_roundNum