Module:Convert: Difference between revisions

"per" units can have a scale multiplier (for the units that used to be "mass per unit area" but are now "pressure")
(builtin hand units default to show name not symbol since "h" is "hour" and is uncommon for "hand")
("per" units can have a scale multiplier (for the units that used to be "mass per unit area" but are now "pressure"))
Line 428:
local per = self.per
local unit1, unit2 = per[1], per[2]
value = (unit1 and unit1.scale or 1) * self.scalemultiplier / unit2.scale
elseif key == 'builtin' then
value = false
Line 496:
if per then
local result = { utype = t.utype, per = {} }
result.scalemultiplier = t.multiplier or 1
override_from(result, t, { 'invert', 'iscomplex', 'default', 'link', 'symbol', 'symlink' })
result.symbol_raw = (result.symbol or false) -- to distinguish between a defined exception and a metatable calculation
Anonymous user