Difference between revisions of "Template:Coord/prec dec"
Jump to navigation
Jump to search
imported>Quarl m (moved Template:Coor/prec dec to Template:Coord/prec dec) |
imported>Quarl (new implementation to fix some bugs) |
||
| Line 1: | Line 1: | ||
| − | <includeonly>{{# | + | <includeonly>{{#switch:{{max|{{precision2|{{{1}}}}}|{{precision2|{{{2}}}}}|0=d|1|2=dm|dms}}</includeonly><noinclude>{{template doc}}</noinclude> |
Revision as of 21:44, 18 April 2007
| This template uses Lua: |
This template, {{Coord/prec dec}}, returns "d", "dm", or "dms" to indicate the most appropriate display format for a latitude-longitude pair expressed in decimal degrees.
Usage
{{Coord/prec dec|lat|long}}
Examples
{{Coord/prec dec|99|1}} |
{{#switch:1 |
{{Coord/prec dec|99|1.2}} |
{{#switch:1 |
{{Coord/prec dec|99|1.23}} |
{{#switch:1 |
{{Coord/prec dec|99|1.234}} |
{{#switch:1 |
{{Coord/prec dec|99|1.2345}} |
{{#switch:1 |
{{Coord/prec dec|99|1.23456}} |
{{#switch:1 |
{{Coord/prec dec|99|1.0}} |
{{#switch:1 |
{{Coord/prec dec|99|1.00}} |
{{#switch:1 |
{{Coord/prec dec|99|1.000}} |
{{#switch:1 |
{{Coord/prec dec|99|1.0000}} |
{{#switch:1 |
{{Coord/prec dec|99|1.00000}} |
{{#switch:1 |
| The above documentation is transcluded from Template:Coord/prec dec/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. Please add categories to the /doc subpage. Subpages of this template. |