無名
public text v1 · immutablefunction round(num, digits)
-- banker's rounding
local mantissa = 10^digits
local norm = num*mantissa
norm = norm + 0.5
local norm_f = math_floor(norm)
if norm == norm_f and (norm_f % 2) ~= 0 then
return (norm_f-1)/mantissa
end
return norm_f/mantissa
end