# round

Source: https://taxilang.org/docs/language/stdlib/round

**Full name:** `taxi.stdlib.round`

## Signature

```taxi
declare extension function round(value: Decimal, precision: Int = 0): Decimal
```

## Description

Rounds a decimal value to the specified number of decimal places.

`precision` defaults to `0` (round to nearest integer).

```taxi
find { measurement: Measurement } as {
   rounded: Decimal = measurement.value.round(2)
}
```

## Examples

Rounds a decimal to the specified number of decimal places.

Query:

```taxi
find {
   rounded2: Decimal = round(3.14159, 2)
   rounded0: Decimal = round(3.7, 0)
}
```

Result:

```json
{
  "rounded2": 3.14,
  "rounded0": 4
}
```
