Difference between revisions of "Template:HMS2Deg"

From blackwiki
Jump to navigation Jump to search
imported>Hyacinth
(→‎See also: {{Math templates|conversion}})
imported>DePiep
(add /doc)
Line 1: Line 1:
 
{{#expr: {{{1|0}}}*15 + {{{2|0}}}/4 + {{{3|0}}}/240 round {{#if:{{{p|}}}|{{{p|}}}|6}}}}<noinclude>
 
{{#expr: {{{1|0}}}*15 + {{{2|0}}}/4 + {{{3|0}}}/240 round {{#if:{{{p|}}}|{{{p|}}}|6}}}}<noinclude>
 
+
{{documentation}}
Usage: {{tlc|HMS2Deg|hours|minutes|seconds| 5=p=precision}}.
 
 
 
This template converts an [[hour angle]], given in hours|minutes|seconds, to decimal degrees. 
 
 
 
So {{tlc|HMS2Deg|12|29|06.7| p=5}} returns {{HMS2Deg|12|29|06.7| p=5}}.
 
 
 
Only parameter '''p''' is optional (defaults to 6). 
 
 
 
==See also==
 
{{Math templates|conversion}}
 
 
 
[[Category:Conversion templates|{{PAGENAME}}]]
 
 
 
 
</noinclude>
 
</noinclude>

Revision as of 07:42, 10 December 2013

0

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

Description

This template converts an hour angle, given in hours:minutes:seconds format, to decimal degrees.

Usage

{{HMS2Deg|hours|minutes|seconds|p=precision|sup=superscript}}.

Hours is required. Minutes, seconds, parameter p, and parameter sup are all optional and default to 0, 0, 6, and <null>, respectively. To include the degree symbol °, add any text to |sup=.

For example:

{{HMS2Deg|12|29|06.7|p=5|sup=y}} returns 187.27792.
{{HMS2Deg|12|p=5}} returns 180.
{{HMS2Deg|12}} returns 180.

See also