Difference between revisions of "Template:Infobox/Location/Coordinate"

From Kerbal Space Program Wiki
Jump to: navigation, search
(!trunc instead of round;)
(+documentation; +translate the second and thrid parameter;)
Line 1: Line 1:
{{#if: {{{1|}}}|{{#expr: trunc abs({{{1}}})}}°&nbsp;{{#expr: trunc(abs({{{1}}}) * 60 mod 60)}}′&nbsp;{{#expr: abs({{{1}}}) * 60 * 60 mod 60 round 0}}″&#8239;{{#ifexpr: {{{1}}} < 0|{{{3}}}|{{{2}}}}}|Unknown°&#8239;{{{2}}}}}
+
{{#if: {{{1|}}}|{{#expr: trunc abs({{{1}}})}}°&nbsp;{{#expr: trunc(abs({{{1}}}) * 60 mod 60)}}′&nbsp;{{#expr: abs({{{1}}}) * 60 * 60 mod 60 round 0}}″&#8239;{{Dict|{{#ifexpr: {{{1}}} < 0|{{{3}}}|{{{2}}}}}}}|Unknown°&#8239;{{Dict|{{{2}}}}}}}<noinclude>
 +
----
 +
Shows the current coordinate in degrees, minutes and seconds.
 +
 
 +
{{Parameter Table|parameters=
 +
{{Parameter Row|1|The coordinate in degrees.}}
 +
{{Parameter Row|2|The name for positive values (usually <tt>N</tt> or <tt>E</tt>). Will be parsed by {{Tl|Dict}}.}}
 +
{{Parameter Row|3|The name for negative values (usually <tt>S</tt> or <tt>W</tt>). Will be parsed by {{Tl|Dict}}.}}
 +
}}
 +
 
 +
[[Category:Templates]]</noinclude>

Revision as of 10:52, 27 August 2013

Unknown° {{{2}}}


Shows the current coordinate in degrees, minutes and seconds.

Template:Parameter Table