Module:Calculator

-- Calculator - Easily add arithmetic operations to wiki pages -- Written by Lil' Miss Rarity -- Version 0.1

local p = {}

function p.addition( frame ) return tonumber(frame.args[1]) + tonumber(frame.args[2]) end

function p.division( frame ) return tonumber(frame.args[1]) / tonumber(frame.args[2]) end

function p.modulo( frame ) return tonumber(frame.args[1]) % tonumber(frame.args[2]) end

function p.multiplication( frame ) return tonumber(frame.args[1]) * tonumber(frame.args[2]) end

function p.subtraction( frame ) return tonumber(frame.args[1]) - tonumber(frame.args[2]) end

return p