66 513
contributi
mNessun oggetto della modifica |
(Formatting Coordinates) |
||
Riga 407: | Riga 407: | ||
local Int | local Int | ||
local Frac | local Frac | ||
local DMS = {} | |||
URI = "http://www.wikisky.org/v2?ra=" .. RA .. "&de=" .. D .. "&zoom=4" | URI = "http://www.wikisky.org/v2?ra=" .. RA .. "&de=" .. D .. "&zoom=4" | ||
Int, Frac = math.modf( | |||
return "[" .. URI .. " " .. | for _, Coord in pairs({RA, D}) do | ||
Int, Frac = math.modf(Coord) | |||
table.insert(DMS, Int) | |||
Int, Frac = math.modf(Frac * 60) | |||
table.insert(DMS, Int) | |||
Int, Frac = math.modf(Frac * 60) | |||
table.insert(DMS, Int) | |||
end | |||
return "[" .. URI .. " " .. table.concat(DMS, " ") .. "]" | |||
end | end | ||
--- Function to expand template contained within description, | --- Function to expand template contained within description, |