mirror of
https://github.com/arcan1s/awesome-widgets.git
synced 2025-04-25 16:07:19 +00:00
more temperature units: Reaumur, cm^-1, kJ/mol, kcal/mol (really, I use
cm^-1)
This commit is contained in:
parent
0240dee6ea
commit
8ccad0b86c
@ -47,6 +47,17 @@ def getTemp(temp, unit):
|
|||||||
temp = str(round(((float(temp) * 9.0 / 5.0) + 32.0), 1))
|
temp = str(round(((float(temp) * 9.0 / 5.0) + 32.0), 1))
|
||||||
elif (unit == "Kelvin"):
|
elif (unit == "Kelvin"):
|
||||||
temp = str(round((float(temp) + 273.15), 1))
|
temp = str(round((float(temp) + 273.15), 1))
|
||||||
|
elif (unit == "Reaumur"):
|
||||||
|
temp = str(round((float(temp) * 0.8), 1))
|
||||||
|
elif (unit == "cm^-1"):
|
||||||
|
kelvin = round((float(temp) + 273.15), 1)
|
||||||
|
temp = str(round((kelvin * 0.695), 1))
|
||||||
|
elif (unit == "kJ/mol"):
|
||||||
|
kelvin = round((float(temp) + 273.15), 1)
|
||||||
|
temp = str(round((kelvin * 8.31), 1))
|
||||||
|
elif (unit == "kcal/mol"):
|
||||||
|
kelvin = round((float(temp) + 273.15), 1)
|
||||||
|
temp = str(round((kelvin * 1.98), 1))
|
||||||
return temp
|
return temp
|
||||||
|
|
||||||
|
|
||||||
|
@ -207,6 +207,11 @@ $m - uptime minutes without zero</string>
|
|||||||
<string notr="true">Kelvin</string>
|
<string notr="true">Kelvin</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">Reaumur</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
Loading…
Reference in New Issue
Block a user