Advertisement
RokettoJanpu

Temperature Conversion

Oct 22nd, 2018
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. {F:{a:32,m:180,t:-459.67,n:"Fahrenheit (F)"},C:{a:0,m:100,t:-273.15,n:"Celsius (C)"},K:{a:273.15,m:100,t:0,n:"Kelvin (K)"},R:{a:491.67,m:180,t:0,n:"Rankine (R)"},DE:{a:-100,m:150,t:-509.725,n:"Delisle (De)"},N:{a:0,m:33,t:-90.1395,n:"Newton (N)"},RE:{a:0,m:80,t:-218.52,n:"Réaumur (Ré)"},RO:{a:7.5,m:52.5,t:-135.90375,n:"Rømer (Rø)"}};try{b=a[u1],c=a[u2];t2=(((t1-b.a)/b.m)*c.m)+c.a;t1>=b.t?`${t1} ${b.n} = ${t2} ${c.n}`:`Temperatures below absolute zero (${b.t} ${b.n}) don't exist!`;}catch(e){`Usage: !temp [temperature] [old temperature unit (F/C/K/R/De/N/Re/Ro)] [new temperature unit (F/C/K/R/De/N/Re/Ro)]`}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement