ASIN
- 来源: https://www.freebasic.net/wiki/wikka.php?wakka=KeyPgAsin
- 最后更新: 2018-04-16
求一个数的反正弦值
语法
declare function Asin ( byval number as double ) as double用法
result = Asin( number )参数
number
正弦值,范围为 [-1..1]。
返回值
number 的反正弦值,以弧度表示,范围为 [-Pi/2..Pi/2]。
说明
Asin 返回参数 number 的反正弦值,结果为 Double 类型,范围在 -Pi/2 到 Pi/2 之间。反正弦是 Sin 函数的逆运算。返回的角度以弧度表示(非度数)。
Asin 可作为运算符重载,以接受用户自定义类型。
示例
vb
Dim h As Double
Dim o As Double
Input "Please enter the length of the hypotenuse of a triangle: ", h
Input "Please enter the length of the opposite side of the triangle: ", o
Print ""
Print "The angle between the sides is"; Asin ( o / h )
Sleep输出结果如下:
Please enter the length of the hypotenuse of a triangle: 5
Please enter the length of the opposite side of the triangle: 3
The angle between the sides is 0.6435011087932844方言差异
- 在 -lang qb 方言中不可用,除非使用别名
__Asin引用。
与 QB 的差异
- FreeBASIC 新增
另请参阅
Sin- 三角函数简介
返回 目录