Toggle menu
15
236
75
27.7K
Kenshi Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
Revision as of 01:58, 21 February 2025 by Prd (talk | contribs) (Created page with "{{Documentation subpage}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see Wikipedia:Wikidata) --> == Description == This template converts a positive decimal degree value to ''degrees''° ''minutes''' ''seconds'''' format, or to ''degrees''° ''minutes''<sup>m</sup> ''seconds''<sup>s</sup> format...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

This template converts a positive decimal degree value to degrees° minutesseconds'' format, or to degrees° minutesm secondss format (the degree symbol ° is invariant between the two formats).

Usage

{{Deg2DMS|positive decimal degrees|p=precision|sup=ms}}

|p= is optional and defaults to 3. It is the number of decimal digits that the seconds are rounded to.
|sup= is optional and changes the default apostrophe-format for arcminutes and arcseconds (1° 2′ 3″) to the m-s-format for arcminutes and arcseconds (1° 2m 3s). Any non-blank value has this effect, but using |sup=ms is customary.

For example:

{{Deg2DMS|266.416837}} returns 266° 25′ 0.613″
{{Deg2DMS|266.416837|p=4}} returns 266° 25′ 0.6132″
{{Deg2DMS|266.416837|p=4|sup= }} returns 266° 25′ 0.6132″

{{Deg2DMS|266.416837|p=4|sup=ms}} returns 266° 25m 0.6132s
{{Deg2DMS|266.416837|p=4|sup=no}} returns 266° 25m 0.6132s
{{Deg2DMS|266.416837|p=4|sup=}} returns 266° 25′ 0.6132″

See also