Module:Coordinates: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
No edit summary |
No edit summary |
||
Line 245:
function convert_dec2dms_dm(coordinate)
coordinate = math_mod._round( coordinate * 60, 0 );
local m =
coordinate = math.floor( (coordinate - m) / 60 );
local d =
return d .. string.format( "%02d′", m )
Line 254:
function convert_dec2dms_dms(coordinate)
coordinate = math_mod._round( coordinate * 60 * 60, 0 );
local s =
coordinate = math.floor( (coordinate - s) / 60 );
local m =
coordinate = math.floor( (coordinate - m) / 60 );
local d =
return d .. string.format( "%02d′", m ) .. string.format( "%02d″", s )
|