2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
/*
|
2023-08-17 10:02:17 +00:00
|
|
|
* Author: commy2, kymckay
|
2015-01-11 16:42:31 +00:00
|
|
|
* Transforms a number to an array of the correspondending digits.
|
|
|
|
*
|
2015-09-17 16:25:02 +00:00
|
|
|
* Arguments:
|
|
|
|
* 0: Number to 'digitize' <NUMBER>
|
2023-05-01 15:33:07 +00:00
|
|
|
* 1: Set the minimal length of the returned array. Useful for getting left hand zeroes. <NUMBER> (default: 1)
|
2015-01-11 16:42:31 +00:00
|
|
|
*
|
2015-09-17 16:25:02 +00:00
|
|
|
* Return Value:
|
2015-09-18 19:46:21 +00:00
|
|
|
* Digits. The maximum count is six digits. <ARRAY>
|
2015-09-17 16:25:02 +00:00
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Example:
|
|
|
|
* [5, 5] call ace_common_fnc_numberToDigits
|
|
|
|
*
|
2015-09-17 16:25:02 +00:00
|
|
|
* Public: Yes
|
2015-01-11 16:42:31 +00:00
|
|
|
*/
|
|
|
|
|
2023-05-01 15:33:07 +00:00
|
|
|
params ["_number", ["_minLength", 1]];
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2018-01-02 17:00:01 +00:00
|
|
|
_number = [_number min 999999, _minLength] call CBA_fnc_formatNumber;
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2018-01-02 17:00:01 +00:00
|
|
|
(_number splitString "") apply { parseNumber _x }
|