Module:Coordinates: Difference between revisions

prevent blank degrees from being treated as 0
m (Changed protection level of Module:Coordinates: High-risk Lua module: allow template editors ([Edit=Allow only template editors and admins] (indefinite) [Move=Allow only template editors and admins] (indefinite)))
(prevent blank degrees from being treated as 0)
Line 186:
]]
local function convert_dec2dms(coordinate, firstPostfix, secondPostfix, precision)
local coord = tonumber(coordinate) or 0
local postfix
if coord >= 0 then
Line 208:
]]
local function convert_dms2dec(direction, degrees_str, minutes_str, seconds_str)
local degrees = tonumber(degrees_str) or 0
local minutes = tonumber(minutes_str) or 0
local seconds = tonumber(seconds_str) or 0
Anonymous user