IBM Lotus Symphony


Atn 函数 [运行时]

返回数字表达式的反正切值的三角函数。返回值在 -Pi/2 到 +Pi/2 之间。

反正切是正切函数的逆运算。如果将 Alpha 角的正切值作为 Atn 函数的参数执行反正切运算,那么计算的结果即为 Alpha 角(以弧度为单位)。在直角三角形中,反正切函数通过 Alpha 角的对边与邻边长度之比来计算该角。

Atn(对边/邻边) = Alpha

语法:

Atn (Number)

返回值:

双倍行距

参数:

Number:表示直角三角形两边之比的任何数字表达式。Atn 函数返回以弧度为单位的相应角度(反正切)。

要将弧度转换为度,请将弧度乘以 180/pi。

度=(弧度*180) /pi

弧度=(度*pi) /180

Pi 在这里是修正后的圆周率常数,四舍五入后的值为 3.14159。

错误代码

5 无效的过程调用

示例:

REM The following example calculates for a right-angled triangle

REM the angle Alpha from the tangent of the angle Alpha:

Sub ExampleATN

REM rounded Pi = 3.14159 is a predefined constant

Dim d1 As Double

Dim d2 As Double

d1 = InputBox$ ("Enter the length of the side adjacent to the angle:","Adjacent")

d2 = InputBox$ ("Enter the length of the side opposite the angle:","Opposite")

Print "The Alpha angle is"; (atn (d2/d1) * 180 / Pi) ; " degrees"

End Sub


产品反馈 | 其他文档 | 商标