Module:Coordinates: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
No edit summary
No edit summary
Line 414: Line 414:
local d = math.floor(coordinate % 360) .. "°"
local d = math.floor(coordinate % 360) .. "°"
local m = string.format( "%02d′", math.floor(60 * coordinate) % 60 )
local m = string.format( "%02d′", math.floor(60 * coordinate) % 60 )
local s = string.format( "%02d″", ((math.round(36000000 * coordinate) / 100) % 6000) / 100 )
local s = string.format( "%02d″", ((math.floor(36000000 * coordinate + 0.5) / 100) % 6000) / 100 )


return d .. m .. s
return d .. m .. s