{ Frameless }

round($arg, $precision)

The round($arg) or round($arg, $precision) function rounds a value to a specified number of decimal places, rounding upwards if two such values are equally near.

Arguments

ArgumentType
$argnumeric
$precisionxs:integer
Return valuenumeric

Examples

round(2.5)3.0
round(2.49)2.0
round(-1.5)-1.0
round(1.245, 2)1.25