math.round

This function returns the nearest integer, rounding half away from zero.

Syntax

math.round(inputNumber)

Arguments

Argument

Type

Description

inputNumber

number

The input number

Returns

Type

Description

number

The nearest integer, rounding half away from zero

Examples

The function math.round(1.50) returns 2.0.