Code: Select all
var Y0 = form.yield.value; // The user input, in megatons of TNT
var Y1 = Y0 * 400;
var Y2 = Y0 * 1000;
var thermal = pow(Y1,0.41);
var blast = pow(Y1,0.33);
var radiation = pow(Y1,0.19);
var blastkill = pow(Y2,0.33)*0.28;
var duration = pow(Y0,0.45)*4.5;
var rad1 = round((pow(Y2,0.4)*90/3.3)/10)/100;
var rad2 = round((pow(Y2,0.4)*110/3.3)/10)/100;
var rad3 = round((pow(Y2,0.4)*145/3.3)/10)/100;
form.thermal.value = OutputUnit(thermal);
form.blast.value = OutputUnit(blast);
form.radiation.value = OutputUnit(radiation);
form.blastkill.value = OutputUnit(blastkill);
form.duration.value = String(round(duration*10)/10)+" seconds";
form.rad1.value = OutputUnit(rad1);
form.rad2.value = OutputUnit(rad2);
form.rad3.value = OutputUnit(rad3);
I thought of looking it up on the site Mike got them from, but it seems to have evaporated. Could anybody tell me where I could find some more information?