IBM Lotus Symphony
|
返回一个角度的正弦值。角度以弧度指定。结果在 -1 到 1 之间。
以 Alpha 角为例,在直角三角形中 Sin 函数计算的是 Alpha 的对边与斜边长度之比。
Sin(Alpha) = 对边/斜边
Sin (Number)
双倍行距
Number:用于指定要计算正弦值的角度的数字表达式,以弧度为单位。
要将度转换为弧度,可将度乘以 pi/180;而要将弧度转换为度,请将弧度乘以 180/pi。
度=(弧度*180) /pi
弧度=(度*pi) /180
Pi 的近似值是 3.141593。
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 hypotenuse:
Sub ExampleSine
REM Pi = 3.1415926 is a predefined variable
Dim d1 as Double
Dim d1 as Double
Dim dAlpha as Double
dAlpha = InputBox$ ("Enter the angle Alpha (in degrees): ","Alpha")
Print "The length of the hypotenuse is"; (d1 / sin (dAlpha * Pi / 180))
End Sub