K
ki11er
Unregistered / Unconfirmed
GUEST, unregistred user!
<script language="JavaScript"><br>function round(number,X) {<br> X = (!X ? 2 : X);<br> return Math.round(number*Math.pow(10,X))/Math.pow(10,X);<br>}//rounding<br>function Log10(x) {<br> var Number;<br> Number = Math.log(x) / Math.log(10);<br> return(Number);<br>}//Log10<br><br>function calc_mw2dbm(){<br>var mw2dbm;<br>var mw2dbm_tmp;<br>var mw2dbm = parseFloat(document.mw2dbm_form.mw2dbm.value,10);<br>var mw2dbm_tmp = parseFloat(document.mw2dbm_form.mw2dbm.value/1000);<br>document.mw2dbm_form.mw2dbm_ans.value = "+"+round((10 * Log10(mw2dbm_tmp) + 30),1)+"dBm";<br>}<br><br>function calc_dbm2mw(){<br>var dbm2mw;<br>var dbm2mw_tmp;<br>var dbm2mw_tmp = parseFloat(document.dbm2mw_form.dbm2mw.value,10);<br>document.dbm2mw_form.dbm2mw_ans.value = round(Math.pow(10,dbm2mw_tmp/10),1)+"mW";<br>}<br><br></script></head><br><br>希望大家帮忙转换成delphi的代码<br><br>谢谢 如果可以再加50分<br><br>谢谢~~<br><br>顺便提供一些数学函数的相关资料<br><br>先测试编译通过后再给代码 谢谢<br>分数再+150