我正在尝试将这个数学公式翻译成 JS:
我尝试在第一部分中使用 tan^-1
但出现错误。
最佳答案
尝试以下操作
function phi_i (l, w, phi) {
// Check and set defaults for the parameters l, w and phi in case the are not set properly ...
var arg = 2 * l * Math.sin(phi) / ( 2 * l * Math.cos(phi) - w * Math.sin(phi) );
return Math.atan(arg);
}
关于javascript - 将数学公式翻译为 JavaScript,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54190542/