math.round

Syntax

i = math.round(n)

Get the nearest integer. The arithmetic rounding convention is used (e.g., 2.6 rounds to 3.0 and 2.4999 rounds to 2).

Returns:i - nearest integer
Arguments:n - number to round