2
执行三角
如何执行在Javascript以下数学题:在Javascript
Tan(x) = 450/120;
x = 75;
// In my calculator I use tan^-1(450/120) to find the answer
// How do I perform tan^-1 in javascript???
我的JavaScript代码输出不正确的结果:
var x = Math.atan(450/120);
alert(x); // says x = 1.3101939350475555
// Maybe I am meant to do any of the following...
var x = Math.atan(450/120) * (Math.PI/2); // still wrong answer
var x = Math.tan(450/120); // still wrong answer
您的计算器是以度模式运行吗?真正的男人使用弧度。 – 2012-04-10 09:42:14
@ 32bitkid大声笑为什么? – 2012-04-10 09:50:56
严肃地说,围绕单位圆的一次完整的旋转是一个距离为2Pi的弧,这并非巧合地是以弧度表示的那个角度的测量值。了解这一点以及其他三角函数与单位圆的关系,将会使你的生活变得更加轻松。 – 2012-04-10 10:01:14