<div class="meta" robots="noindex">

</div>

Method

# Xojo.Math.Round

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2020r2. Please use `Round</api/math/round>` as a replacement.

</div>

## Description

Returns the value rounded to the nearest whole number.

## Sample code

Some rounding examples:

``` xojo
Using Xojo.Math

Dim d As Double
d = Round(1.499) ' d = 1
d = Round(1.500) ' d = 2
d = Round(1.1) ' d = 1
d = Round(1.7) ' d = 2
```

## Compatibility

All project types on all supported operating systems.
