Module:Coordinates: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
No edit summary
No edit summary
Line 238: Line 238:
end
end


local precision = coordinates.prec_dec.max_precision(args[1], args[3])
local precision = math.max( math_mod._precision(args[1]), math_mod._precision(args[3]) )
coordinateSpec["dms-lat"] = convert_dec2dms(args[1], args[2], postfixInverter(args[2],"lat"), precision) -- {{coord/dec2dms|{{{1}}}|{{{2}}}|{{#ifeq:{{{2}}}|N|S|N}}|{{coord/prec dec|{{{1}}}|{{{3}}}}}}}
coordinateSpec["dms-lat"] = convert_dec2dms(args[1], args[2], postfixInverter(args[2],"lat"), precision) -- {{coord/dec2dms|{{{1}}}|{{{2}}}|{{#ifeq:{{{2}}}|N|S|N}}|{{coord/prec dec|{{{1}}}|{{{3}}}}}}}
coordinateSpec["dms-long"] = convert_dec2dms(args[3], args[4], postfixInverter(args[4],"long"), precision) -- {{coord/dec2dms|{{{3}}}|{{{4}}}|{{#ifeq:{{{4}}}|E|W|E}}|{{coord/prec dec|{{{1}}}|{{{3}}}}}}}
coordinateSpec["dms-long"] = convert_dec2dms(args[3], args[4], postfixInverter(args[4],"long"), precision) -- {{coord/dec2dms|{{{3}}}|{{{4}}}|{{#ifeq:{{{4}}}|E|W|E}}|{{coord/prec dec|{{{1}}}|{{{3}}}}}}}