Difference between revisions of "Template:HMS2Deg/doc"

From blackwiki
Jump to navigation Jump to search
imported>DePiep
m
imported>Vanisaac
m (→‎See also: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
 
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
 
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
 +
 +
== Description ==
 +
This template converts an [[hour angle]], given in ''hours'':''[[Minute and second of arc|minutes]]'':''[[Minute and second of arc|seconds]]'' format, to [[decimal degrees]].
  
 
== Usage ==
 
== Usage ==
 +
<code><nowiki>{{HMS2Deg|</nowiki>''hours''<nowiki>|</nowiki>''minutes''<nowiki>|</nowiki>''seconds''<nowiki>|p=</nowiki>''precision''<nowiki>|sup=</nowiki>''superscript''<nowiki>}}</nowiki></code>.<br>
  
Usage: {{tlc|HMS2Deg|hours|minutes|seconds| 5=p=precision}}.
+
''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 <code>°</code>, add any text to {{para|sup}}.
  
This template converts an [[hour angle]], given in hours|minutes|seconds, to decimal degrees.
+
For example:<br>
  
So {{tlc|HMS2Deg|12|29|06.7| p=5}} returns {{HMS2Deg|12|29|06.7| p=5}}.
+
<code><nowiki>{{HMS2Deg|12|29|06.7|p=5|sup=y}}</nowiki></code> returns {{HMS2Deg|12|29|06.7|p=5|sup=y}}.<br>
 
+
<code><nowiki>{{HMS2Deg|12|p=5}}</nowiki></code> returns {{HMS2Deg|12|p=5}}.<br>
Only parameter '''p''' is optional (defaults to 6).
+
<code><nowiki>{{HMS2Deg|12}}</nowiki></code> returns {{HMS2Deg|12}}.
  
 
==See also==
 
==See also==
 
{{Math templates|conversion}}
 
{{Math templates|conversion}}
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
+
<includeonly>{{Sandbox other||
 
<!-- Categories go here, and interwikis go in Wikidata -->
 
<!-- Categories go here, and interwikis go in Wikidata -->
[[Category:Conversion templates|{{PAGENAME}}]]
+
[[Category:Numerical conversion templates|{{PAGENAME}}]]
[[Category:Subtemplates of Template Convert/wrapper templates|HMS2Deg]]
+
[[Category:Convert-like templates|{{SUBPAGENAME}}]]
 +
 
 
}}</includeonly>
 
}}</includeonly>

Latest revision as of 16:55, 25 April 2020

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