IBM Lotus Symphony


Tan 函数 [运行时]

计算一个角度的正切值。角度以弧度指定。

以 Alpha 角为例,在直角三角形中 Tan 函数计算的是 Alpha 的对边与邻边长度之比。

Tan(Alpha) = 对边/邻边

语法:

Tan (Number)

返回值:

双倍行距

参数:

Number:要计算正切值的任何数字表达式,以弧度为单位。

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

度 =(弧度*180)/Pi

弧度 =(度*Pi)/180

Pi 的近似值是 3.141593。

错误代码

5 无效的过程调用

示例:

REM In this example, the following entry is possible for a right-angled triangle:

REM The side opposite the angle and the angle (in degrees) to calculate the length of the side adjacent to the angle:

Sub ExampleTangens

REM Pi = 3.1415926 is a pre-defined variable

Dim d1 as Double

Dim d1 as Double

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

dAlpha = InputBox$ ("Enter the Alpha angle (in degrees) :","Alpha")

Print "the length of the side adjacent the angle is"; (d1 / tan (dAlpha * Pi / 180))

End Sub


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