math.round

Se admite en los siguientes sistemas operativos:
math.round(numericExpression, decimalPlaces)

Descripción

Devuelve un valor redondeado al número entero más cercano o a la cantidad especificada de posiciones decimales.

Tipos de datos de parámetros

NUMBER

Tipo de datos que se devuelve

NUMBER

Muestras de código

math.round(10.7) // returns 11
math.round(1.2567, 2) // returns 1.25
math.round(0-10.7) // returns -11
math.round(0-1.2) // returns -1
math.round(4) // returns 4, math.round(integer) returns the integer