Module:Compare

require "Module:BonusMalus"

function Compare(number1,number2,rounding) local temp = (number1 / number2) - 1.00 if rounding ~= nil and rounding ~= 0 and rounding ~= false and rounding ~= "false" then temp = math.floor((temp * 40) + 0.5) / 4 * 10 else temp = temp * 100 end return temp end

local p = {} function p.main(frame) return Compare(tonumber(frame.args[1]),tonumber(frame.args[2]),frame.args[3]) end return p