Acos
 
取回一个角的反余弦

语法

Declare Function Acos ( ByVal number As Double ) As Double

用法

result = Acos( number )

参数

number
范围[-1..1]中的余弦值。

返回值

number 的反余弦(弧度)范围为[0..Pi].

说明

Acosnumber 的参数number 的反余弦值返回到0到Pi的范围内。反光素是Cos功能的倒数。返回的角度在弧度(不是)中测量。

例子

Dim h As Double
Dim a As Double
Input "请输入三角形斜边的长度:", h
Input "请输入三角形相邻边的长度:", a
Print ""
Print "两边之间的角度是"; Acos ( a / h )
Sleep

输出将如下所示:
Please enter the length of the hypotenuse of a triangle: 5
Please enter the length of the adjacent side of the triangle: 4

The angle between the sides is 0.6435011087932843

方言差异

  • -lang qb 方言中不可用,除非使用别名__Acos引用。

与QB差别

  • 新的FreeBASIC

参考