Difference between revisions of "Template:Deg2DMS/sandbox"

From blackwiki
Jump to navigation Jump to search
imported>Tom.Reding
(round 14 wins)
imported>Jonesey95
(sync)
Line 1: Line 1:
{{#expr: FLOOR({{{1|0}}})}}°&nbsp;{{#expr: FLOOR( ((({{{1|0}}}) - FLOOR({{{1|0}}})) round 16 )*60)}}{{#if:{{{sup|}}}|<sup>m</sup>|&apos;}}&nbsp;{{#expr: (((({{{1|0}}})-FLOOR({{{1|0}}}))*60) - FLOOR( ((({{{1|0}}})-FLOOR({{{1|0}}})) round 16 )*60))*60 round {{#if:{{{p|}}}|{{{p|}}}|3}}}}{{#if:{{{sup|}}}|<sup>s</sup>|&apos;&apos;}}<noinclude>
+
<!--
 
+
-->{{#expr: FLOOR({{{1|0}}})}}°&nbsp;<!--
{{#expr: FLOOR( (((30.2) - FLOOR(30.2))  )*60)}}
+
-->{{#expr: FLOOR( ((({{{1|0}}}) - FLOOR({{{1|0}}})) round 14 )*60)}}{{#if:{{{sup|}}}|<sup>m</sup>|}}&nbsp;<!--
{{#expr: FLOOR( (((30.2) - FLOOR(30.2)) round 1 )*60)}}
+
-->{{#expr: (((({{{1|0}}})-FLOOR({{{1|0}}}))*60) - FLOOR( ((({{{1|0}}})-FLOOR({{{1|0}}})) round 14 )*60))*60 round {{#if:{{{p|}}}|{{{p|}}}|3}}}}{{#if:{{{sup|}}}|<sup>s</sup>|}}<noinclude>
{{#expr: FLOOR( (((30.2) - FLOOR(30.2)) round 2 )*60)}}
+
{{Documentation}}
{{#expr: FLOOR( (((30.2) - FLOOR(30.2)) round 3 )*60)}}
 
{{#expr: FLOOR( (((30.2) - FLOOR(30.2)) round 4 )*60)}}
 
{{#expr: FLOOR( (((30.2) - FLOOR(30.2)) round 13 )*60)}}
 
{{#expr: FLOOR( (((30.2) - FLOOR(30.2)) round 14 )*60)}}
 
{{#expr: FLOOR( (((30.2) - FLOOR(30.2)) round 15 )*60)}}
 
{{#expr: FLOOR( (((30.2) - FLOOR(30.2)) round 16 )*60)}}, (desired minutes=12; round=14 wins)
 
 
 
{{#expr: ((((30.2)-FLOOR(30.2))*60) - FLOOR( (((30.2)-FLOOR(30.2)) )*60))*60 round {{#if:{{{p|}}}|{{{p|}}}|3}}}},
 
{{#expr: ((((30.2)-FLOOR(30.2))*60) - FLOOR( (((30.2)-FLOOR(30.2)) round 1 )*60))*60 round {{#if:{{{p|}}}|{{{p|}}}|3}}}},
 
{{#expr: ((((30.2)-FLOOR(30.2))*60) - FLOOR( (((30.2)-FLOOR(30.2)) round 2 )*60))*60 round {{#if:{{{p|}}}|{{{p|}}}|3}}}},
 
{{#expr: ((((30.2)-FLOOR(30.2))*60) - FLOOR( (((30.2)-FLOOR(30.2)) round 3 )*60))*60 round {{#if:{{{p|}}}|{{{p|}}}|3}}}},
 
{{#expr: ((((30.2)-FLOOR(30.2))*60) - FLOOR( (((30.2)-FLOOR(30.2)) round 11 )*60))*60 round {{#if:{{{p|}}}|{{{p|}}}|3}}}},
 
{{#expr: ((((30.2)-FLOOR(30.2))*60) - FLOOR( (((30.2)-FLOOR(30.2)) round 12 )*60))*60 round {{#if:{{{p|}}}|{{{p|}}}|3}}}},
 
{{#expr: ((((30.2)-FLOOR(30.2))*60) - FLOOR( (((30.2)-FLOOR(30.2)) round 13 )*60))*60 round {{#if:{{{p|}}}|{{{p|}}}|3}}}},
 
{{#expr: ((((30.2)-FLOOR(30.2))*60) - FLOOR( (((30.2)-FLOOR(30.2)) round 14 )*60))*60 round {{#if:{{{p|}}}|{{{p|}}}|3}}}},
 
{{#expr: ((((30.2)-FLOOR(30.2))*60) - FLOOR( (((30.2)-FLOOR(30.2)) round 15 )*60))*60 round {{#if:{{{p|}}}|{{{p|}}}|3}}}},
 
{{#expr: ((((30.2)-FLOOR(30.2))*60) - FLOOR( (((30.2)-FLOOR(30.2)) round 16 )*60))*60 round {{#if:{{{p|}}}|{{{p|}}}|3}}}},
 
{{#expr: ((((30.2)-FLOOR(30.2))*60) - FLOOR( (((30.2)-FLOOR(30.2)) round 17 )*60))*60 round {{#if:{{{p|}}}|{{{p|}}}|3}}}},
 
{{#expr: ((((30.2)-FLOOR(30.2))*60) - FLOOR( (((30.2)-FLOOR(30.2)) round 18 )*60))*60 round {{#if:{{{p|}}}|{{{p|}}}|3}}}}, (desired seconds=0; round=14 wins)
 
 
 
{{#expr: FLOOR( (((105.38) - FLOOR(105.38))  )*60)}}
 
{{#expr: FLOOR( (((105.38) - FLOOR(105.38)) round 1 )*60)}}
 
{{#expr: FLOOR( (((105.38) - FLOOR(105.38)) round 2 )*60)}}
 
{{#expr: FLOOR( (((105.38) - FLOOR(105.38)) round 3 )*60)}}
 
{{#expr: FLOOR( (((105.38) - FLOOR(105.38)) round 13 )*60)}}
 
{{#expr: FLOOR( (((105.38) - FLOOR(105.38)) round 14 )*60)}}
 
{{#expr: FLOOR( (((105.38) - FLOOR(105.38)) round 15 )*60)}}
 
{{#expr: FLOOR( (((105.38) - FLOOR(105.38)) round 16 )*60)}}
 
{{#expr: FLOOR( (((105.38) - FLOOR(105.38)) round 17 )*60)}}
 
{{#expr: FLOOR( (((105.38) - FLOOR(105.38)) round 18 )*60)}}, (desired minutes=22; round>1 wins)
 
 
 
{{#expr: FLOOR( (((30.987654) - FLOOR(30.987654))  )*60)}}
 
{{#expr: FLOOR( (((30.987654) - FLOOR(30.987654)) round 1 )*60)}}
 
{{#expr: FLOOR( (((30.987654) - FLOOR(30.987654)) round 2 )*60)}}
 
{{#expr: FLOOR( (((30.987654) - FLOOR(30.987654)) round 3 )*60)}}
 
{{#expr: FLOOR( (((30.987654) - FLOOR(30.987654)) round 4 )*60)}}
 
{{#expr: FLOOR( (((30.987654) - FLOOR(30.987654)) round 5 )*60)}}
 
{{#expr: FLOOR( (((30.987654) - FLOOR(30.987654)) round 6 )*60)}}
 
{{#expr: FLOOR( (((30.987654) - FLOOR(30.987654)) round 13 )*60)}}
 
{{#expr: FLOOR( (((30.987654) - FLOOR(30.987654)) round 14 )*60)}}
 
{{#expr: FLOOR( (((30.987654) - FLOOR(30.987654)) round 15 )*60)}}
 
{{#expr: FLOOR( (((30.987654) - FLOOR(30.987654)) round 16 )*60)}}
 
{{#expr: FLOOR( (((30.987654) - FLOOR(30.987654)) round 17 )*60)}}, (desired minutes=59; round>1 wins)
 
 
 
{{Deg2DMS/sandbox|30.2000}}
 
 
 
{{Deg2DMS/sandbox|30.2000|p=0}}
 
 
 
{{Deg2DMS/sandbox|30.2000|p=1}}
 
 
 
{{Deg2DMS/sandbox|30.2|p=5}}
 
 
 
{{Deg2DMS/sandbox|30.21}}
 
 
 
{{Deg2DMS/sandbox|30.3}}
 
 
 
{{Deg2DMS/sandbox|30.4}}
 
 
 
{{Deg2DMS/sandbox|30.5}}
 
 
 
{{Deg2DMS/sandbox|105.38}}
 
 
</noinclude>
 
</noinclude>

Revision as of 15:09, 14 November 2020

0° 0′ 0″

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

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}}.

Parameter p is optional and defaults to 3. It is the number of decimal digits that the seconds are rounded to.
Parameter 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° 25m 0.6132s.

See also