Difference between revisions of "Template:Coor/prec dms"

From blackwiki
Jump to navigation Jump to search
imported>Quarl
(«new: +{{#ifeq:0,0|{{#expr:{{{1}}} * 60 mod 60 round 1}},{{#expr:{{{2}}} * 60 mod 60 round 1}}|d|{{#ifeq:0,0|{{#expr:{{{1}}} * 3600 mod 3600 round 1}},{{#expr:{{{2}}} * 3600 mod 3600 round 1}}|dm|dms}}»)
 
imported>Quarl
(«+"<includeonly>", +"</includeonly><noinclude> {{template doc}} </noinclude>"»)
Line 1: Line 1:
{{#ifeq:0,0|{{#expr:{{{1}}} * 60 mod 60 round 1}},{{#expr:{{{2}}} * 60 mod 60 round 1}}|d|{{#ifeq:0,0|{{#expr:{{{1}}} * 3600 mod 3600 round 1}},{{#expr:{{{2}}} * 3600 mod 3600 round 1}}|dm|dms}}
+
<includeonly>{{#ifeq:0,0|{{#expr:{{{1}}} * 60 mod 60 round 1}},{{#expr:{{{2}}} * 60 mod 60 round 1}}|d|{{#ifeq:0,0|{{#expr:{{{1}}} * 3600 mod 3600 round 1}},{{#expr:{{{2}}} * 3600 mod 3600 round 1}}|dm|dms}}</includeonly><noinclude>
 +
{{template doc}}
 +
</noinclude>

Revision as of 05:09, 18 March 2007

Template documentation[view] [edit] [history] [purge]

Given two decimal numbers which were converted from d/m/s, return the coordinate precision:

ddegrees
dmdegrees, minutes
dmsdegrees, minutes, seconds

Examples:

{{coor/prec}}{{#ifeq:0,0|0,0|d|dm
{{coor/prec}}{{#ifeq:0,0|0,0|d|dm
{{coor/prec}}{{#ifeq:0,0|30,30|d|dms
{{coor/prec}}{{#ifeq:0,0|22,-10|d|dms
{{coor/prec}}{{#ifeq:0,0|58,26|d|dms
{{coor/prec}}{{#ifeq:0,0|58,0|d|dms