Jump to content

Template:Coord/dec2dms: Difference between revisions

From IdeaWazaWiki
wikademia>Quarl
«+"<noinclude>{{template doc}}</noinclude>"»
wikademia>Wikademia
m 20 revisions
 
(18 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{#ifexpr:{{{1}}} >= 0
<includeonly>{{Coord/dec2dms/{{{4}}}|{{#ifexpr:{{{1}}} >= 0||-}}{{{1}}}}}{{#ifexpr:{{{1}}} >= 0|{{{2}}}|{{{3}}}}}</includeonly><noinclude>{{pp-template|small=yes}}{{template doc}}[[Category:Coord template]]</noinclude>
  {{#switch:{{{prec}}}
    |d={{#expr:{{{1}}} round 0}}°
    |dm={{#expr:{{{1}}} round 0}}°{{#expr:{{{1}}} * 60 mod 60 round 0}}′
    |dms={{#expr:{{{1}}} round 0}}°{{#expr:{{{1}}} * 60 mod 60 round 0}}′{{#expr:{{{1}}} * 3600 mod 3600 round 1}}″}} {{{2}}}
  |{{#switch:{{{prec}}}
    |d={{#expr:-{{{1}}} round 0}}°
    |dm={{#expr:-{{{1}}} round 0}}°{{#expr:-{{{1}}} * 60 mod 60 round 0}}′
    |dms={{#expr:-{{{1}}} round 0}}°{{#expr:-{{{1}}} * 60 mod 60 round 0}}′{{#expr:-{{{1}}} * 3600 mod 3600 round 1}}″}} {{{3}}}}}<noinclude>{{template doc}}</noinclude>

Latest revision as of 11:28, 21 March 2009