# Round

Rounds a number to the closest integer.

## Method Signature

```
Round(number=[numeric], precision=[integer])
```

### Arguments

| Argument    | Type      | Required | Description                                              | Default |
| ----------- | --------- | -------- | -------------------------------------------------------- | ------- |
| `number`    | `numeric` | `true`   | The number to be rounded.                                |         |
| `precision` | `integer` | `false`  | The number of decimal places to round to (default is 0). | `0`     |

## Examples

### Round 1.56

[Run Example](https://try.boxlang.io/?code=eJwryi%2FNS9FQMNQzNVPQtOYCACV1A8k%3D)

```java
round( 1.56 );

```

Result: 2

### Round 1.49

[Run Example](https://try.boxlang.io/?code=eJwryi%2FNS9FQMNQzsVTQtOYCACV%2BA8s%3D)

```java
round( 1.49 );

```

Result: 1

### Round -0.9

[Run Example](https://try.boxlang.io/?code=eJwryi%2FNS9FQ0NWzVNC05gIAIVoDkw%3D%3D)

```java
round( -.9 );

```

Result: -1

### Additional Examples

```java
pi = 3.1415926535;
pi_rounded = Round( pi, 2 );
println( pi ); // 3.1415926535
println( pi_rounded );
 // 3.14
```

## Related

* [Abs](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/abs)
* [Acos](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/acos)
* [Asin](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/asin)
* [Atn](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/atn)
* [Ceiling](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/ceiling)
* [Cos](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/cos)
* [DecrementValue](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/decrementvalue)
* [Exp](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/exp)
* [Fix](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/fix)
* [Floor](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/floor)
* [FormatBaseN](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/formatbasen)
* [IncrementValue](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/incrementvalue)
* [InputBaseN](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/inputbasen)
* [Int](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/int)
* [Log](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/log)
* [Log10](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/log10)
* [Max](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/max)
* [Min](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/min)
* [Pi](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/pi)
* [PrecisionEvaluate](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/precisionevaluate)
* [Rand](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/rand)
* [Randomize](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/randomize)
* [RandRange](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/randrange)
* [Sgn](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/sgn)
* [Sin](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/sin)
* [Sqr](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/sqr)
* [Tan](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/math/tan)
