---
name: "BIS_fnc_cutDecimals"
type: function
status: ok
groups: ["Math"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/BIS_fnc_cutDecimals
revid: 349047
updated: 2023-11-08T14:47:17Z
---

# BIS_fnc_cutDecimals

*Function · Math · Arma 3 v0.50 · introduced in Arma 2 v1.00*

## Description

Function that rounds specified number to specified amount of decimals.

> [!NOTE]
> **Arma 3:** Use [toFixed](../commands/toFixed.md) instead.

## Syntax

```sqf
[number, precision] call BIS_fnc_cutDecimals
```

**Parameters:**

- `number`: [Number](../topics/Number.md) - decimal number to round.
- `precision`: [Number](../topics/Number.md) - (Optional, default 0) amount of decimals to round to

**Returns:** [Number](../topics/Number.md) - rounded number.

## Examples

### Example 1

```sqf
private _cutDecimals = [33.3333, 1] call BIS_fnc_cutDecimals; // returns 33.3
```

## See also

[toFixed](../commands/toFixed.md) · [BIS_fnc_numberDigits](../functions/BIS_fnc_numberDigits.md) · [BIS_fnc_numberText](../functions/BIS_fnc_numberText.md)

<sub>Source: [BI Community Wiki — BIS fnc cutDecimals](https://community.bistudio.com/wiki/BIS_fnc_cutDecimals) (revision 349047).</sub>
