tfw: correct formula to calculate electron volts

master
mutantmonkey 2014-05-15 14:19:48 -07:00
parent b0edaf99a0
commit 9b05dccf28
1 changed files with 5 additions and 4 deletions

View File

@ -50,11 +50,12 @@ def tfw(phenny, input, fahrenheit=False, celsius=False, mev=False):
temp = "{0:d}°F‽".format(int(tempf)) temp = "{0:d}°F‽".format(int(tempf))
elif celsius: elif celsius:
temp = "{0:d}°C‽".format(w.temperature) temp = "{0:d}°C‽".format(w.temperature)
elif mev:
tempev = (w.temperature + 273.15) * 8.617343e-5 * 1000
temp = "%f meV‽" % tempev
else: else:
temp = "{0:f} Meters‽".format((w.temperature + 273.15) * 8.617343e-5 * 12.39842) tempev = (w.temperature + 273.15) * 8.6173324e-5 / 2
if mev:
temp = "{0:f} meV‽".format(tempev * 1000)
else:
temp = "{0:f} Meters‽".format(tempev * 12.39842)
if w.temperature < 6: if w.temperature < 6:
remark = "IT'S FUCKING COLD" remark = "IT'S FUCKING COLD"