math.round

Supported in:
math.round(numericExpression, decimalPlaces)

Description

Returns a value rounded to the nearest integer or to the specified number of decimal places.

Param data types

NUMBER

Return type

NUMBER

Code samples

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