math.round

Rounds half away from zero. With precision, rounds to that many decimals and returns float.

math.round(x: int/float) -> int
math.round(x: int/float, precision: int) -> float

Parameters

Example

math.round(close, 2)