Board Thread:Support Requests - Getting Technical/@comment-1845439-20200224073812/@comment-1845439-20200224100656

The Math module itself states: --[[ round

Rounds a number to specified precision

Usage:

--]]

function wrap.round(args) local value = p._cleanNumber(args[1] or args.value or 0) local precision = p._cleanNumber(args[2] or args.precision or 0) if value == nil or precision == nil then return err('round input appears non-numeric') else return p._round(value, precision) end end

function p._round(value, precision) local rescale = math.pow(10, precision or 0); return math.floor(value * rescale + 0.5) / rescale; end