{"name":"BIS_fnc_cutDecimals","operator":null,"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","replaced_by":[],"games":[{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma2","name":"Arma 2","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"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","since":null,"effect":null,"exec":null,"params":[{"name":"number","type":"Number","optional":false,"default":null,"description":"decimal number to round.","types":["Number"],"since":null,"text":"number: Number - decimal number to round."},{"name":"precision","type":"Number","optional":true,"default":"0","description":"amount of decimals to round to","types":["Number"],"since":null,"text":"precision: Number - (Optional, default 0) amount of decimals to round to"}],"returns":{"type":"Number","types":["Number"],"description":"rounded number.","text":"Number - rounded number."}}],"examples":[{"text":"```sqf\nprivate _cutDecimals = [33.3333, 1] call BIS_fnc_cutDecimals; // returns 33.3\n```","code":["private _cutDecimals = [33.3333, 1] call BIS_fnc_cutDecimals; // returns 33.3"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["toFixed","BIS_fnc_numberDigits","BIS_fnc_numberText"],"notes":[],"categories":["Arma 2: Functions","Arma 2: New Functions","Arma 2: Operation Arrowhead: Functions","Arma 3: Functions","Function Group: Math","Functions","Introduced with Arma 2 version 1.00","Take On Helicopters: Functions"],"docblock":null,"filled_from_docblock":[]}