Difference between revisions of "Template:HMS2Deg"

From blackwiki
Jump to navigation Jump to search
imported>Salix alba
(Argh should really be Category:Conversion templates)
imported>Droll
(fix tricky bug - I think there might be other problems)
Line 1: Line 1:
{{#expr: {{{1|0}}}*15 + {{{2|0}}}/4 + {{{3|0}}}/240 round {{{p|6}}}}}<noinclude>
+
{{#expr: {{{1|0}}}*15 + {{{2|0}}}/4 + {{{3|0}}}/240 round {{#if:{{{p|}}}|{{{p|}}}|6}}}}<noinclude>
  
 
Usage: {{tlc|HMS2Deg|hours|minutes|seconds| 5=p=precision}}.  
 
Usage: {{tlc|HMS2Deg|hours|minutes|seconds| 5=p=precision}}.  
Line 10: Line 10:
  
 
==See also==
 
==See also==
[[Template:DMS2Deg]]
+
[[Template:Decdeg]]
  
 
[[Category:Conversion templates|{{PAGENAME}}]]
 
[[Category:Conversion templates|{{PAGENAME}}]]
  
 
</noinclude>
 
</noinclude>

Revision as of 20:35, 2 June 2010

0

Usage: {{HMS2Deg|hours|minutes|seconds|p=precision}}.

This template returns an hour angle, given in hours|minutes|seconds, in decimal degrees.

So {{HMS2Deg|12|29|06.7}} returns 187.27792.

Only parameter p is optional (defaults to 6).

See also

Template:Decdeg