{"name":"BIS_fnc_cutDecimals","title":"BIS fnc cutDecimals","type":"function","url":"https://community.bistudio.com/wiki/BIS_fnc_cutDecimals","revid":349047,"updated":"2023-11-08T14:47:17Z","groups":["Math"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Function that rounds specified number to specified amount of decimals.\n\n> [!NOTE]\n> **Arma 3:** Use toFixed instead.","syntaxes":[{"syntax":"[number, precision] call BIS_fnc_cutDecimals","params":[{"name":"number","type":"Number","description":"decimal number to round.","type_expr":"Number"},{"name":"precision","type":"Number","optional":true,"default":"0","description":"amount of decimals to round to","type_expr":"Number","text":"precision: Number - (Optional, default 0) amount of decimals to round to"}],"returns":{"type":"Number","type_expr":"Number","description":"rounded number."}}],"examples":[{"code":["private _cutDecimals = [33.3333, 1] call BIS_fnc_cutDecimals; // returns 33.3"]}],"see_also":["toFixed","BIS_fnc_numberDigits","BIS_fnc_numberText"]}