Difference between revisions of "Template:Temperature"

From The Powder Toy
Jump to: navigation, search
(Created page with "<includeonly>'''[{{{t}}}°K: {{#expr:{{{t}}}-273.15}}°C: {{#expr:({{{t}}}*1.8)-459.67}}°F]'''</includeonly><noinclude>The argument is passed as Kelvins. Do not try to ...")
 
(Display temperature in degrees C only, move Kelvin and Fahrenheit into a tooltip)
Line 1: Line 1:
<includeonly>'''[{{{t}}}&deg;K: {{#expr:{{{t}}}-273.15}}&deg;C: {{#expr:({{{t}}}*1.8)-459.67}}&deg;F]'''</includeonly><noinclude>The argument is passed as Kelvins.
+
<includeonly><span class="temperature" data-toggle="tooltip" data-original-title="{{{t}}}K; {{#expr:({{{t}}}*1.8)-459.67}}&deg;F">{{#expr:{{{t}}}-273.15}}&deg;C</span></includeonly><noinclude>The argument ''t'' is the temperature in Kelvin. It will be displayed in &deg;C, and in K and &deg;F in a tooltip.  
Do not try to fix the expression errors: if you pass the parameter right, it will work.
 
 
Example: <nowiki>{{ Temperature | t=1000 }}</nowiki> and you will get {{ Temperature | t=1000 }} </noinclude>
 
Example: <nowiki>{{ Temperature | t=1000 }}</nowiki> and you will get {{ Temperature | t=1000 }} </noinclude>

Revision as of 15:09, 5 October 2014

The argument t is the temperature in Kelvin. It will be displayed in °C, and in K and °F in a tooltip. Example: {{ Temperature | t=1000 }} and you will get 726.85°C