Module:Sandbox/Aurelain/HeroClassSkills: Difference between revisions
From Heroes of Might and Magic: Olden Era Official Wiki
Created page with "-- This module is intended as a supporting muscle for the HeroClassSkills template. local p = {} -- Displays a variable ------------------------------------------------------------------------------------------------------------------------ local function dump(target) return '<pre>' .. mw.dumpObject(target) .. '</pre>' end ------------------------------------------------------------------------------------------------------------------------ function p.percent(fram..." |
No edit summary |
||
| Line 12: | Line 12: | ||
local a = frame.args[1] | local a = frame.args[1] | ||
local b = frame.args[2] | local b = frame.args[2] | ||
return string.format("%.2f", a/b) | return string.format("%.2f", 100 * a / b) | ||
end | end | ||
return p | return p | ||
Revision as of 08:39, 8 August 2026
Documentation for this module may be created at Module:Sandbox/Aurelain/HeroClassSkills/doc
-- This module is intended as a supporting muscle for the HeroClassSkills template.
local p = {}
-- Displays a variable
------------------------------------------------------------------------------------------------------------------------
local function dump(target)
return '<pre>' .. mw.dumpObject(target) .. '</pre>'
end
------------------------------------------------------------------------------------------------------------------------
function p.percent(frame)
local a = frame.args[1]
local b = frame.args[2]
return string.format("%.2f", 100 * a / b)
end
return p


