Tan()返回错误的值 [英] Tan() Returns Wrong Value
本文介绍了Tan()返回错误的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试计算三个点之间的角度,我需要使用切线函数tan()
.奇怪的是VBA返回错误的值.
I am trying to calculate angle between three points and I need to use the Tangent function tan()
. The weird thing is that VBA return wrong value.
例如:
tan(209)= 0.554309051
tan(209) = 0.554309051
但在VBA中:
tan(209)= -.696695985548265
tan(209) = -.696695985548265
我的朋友告诉我有关规范化"的信息.但我不明白他在说什么以及如何去做.为什么会这样?
My friend told me about something called "Normalize". but I didn't understand what he's talking about and how to do it. Why is this happening?
推荐答案
根据此 VBA使用弧度. 将度转换为弧度((度* 2 * pi)/360
According to this VBA uses radians. Convert degrees into radians , ( degrees * 2 * pi) / 360
tan((209 * 2 * 3.14)/360)
这篇关于Tan()返回错误的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文