BIS_fnc_decodeFlags4

From Bohemia Interactive Community
Hover & click on the images for description

Description

Description:
Decodes a single scalar into array of unique 4-state flags (values 0,1,2,3).
Execution:
call
Groups:
Bitwise

Syntax

Syntax:
[encodedFlags, size] call BIS_fnc_decodeFlags4
Parameters:
encodedFlags: Number - non-decimal number between 0 and 16777215
size: Number - (Optional, default -1) output size. Size -1 means output will not be resized
Return Value:
Number - decoded flags

Examples

Example 1:
private _decodedFlags = 225 call BIS_fnc_decodeFlags4; // [1,0,2,3]
Example 2:
private _decodedFlags = [225, 8] call BIS_fnc_decodeFlags4; // [1,0,2,3,0,0,0,0]

Additional Information

See also:
BIS_fnc_encodeFlags4

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