ACos
计算数的反余弦值.
ACos ( expression )
参数
expression
|
-1 到 1(包括 -1, 1)之间的任意数.
|
返回值
返回三角函数的反余弦值, 结果为弧度单位.
备注
ACos(x) 数学定义范围为 -1 < x < 1, 因此 ACos 往往返回 -1.#IND 表示 x 为其它数.
函数示例
示例 1
#include <MsgBoxConstants.au3>
Example()
Func Example()
; Assign a Local variable the arcCosine of 0.5.
Local $fArcCos1 = ACos(0.5)
; Display the result.
MsgBox($MB_SYSTEMMODAL, "", $fArcCos1 & " rad.")
; Assign a Local constant variable the approximate PI number.
Local Const $PI = 3.141592653589793
; Assign a Local variable the formula to switch from radian to degree (equals to one radian in degree).
Local $fRadToDeg = 180 / $PI
; Assign a Local variable a number in degree.
Local $fArcCos2 = $fRadToDeg * ACos(-1)
; Display the result.
MsgBox($MB_SYSTEMMODAL, "", $fArcCos2 & " deg.")
EndFunc ;==>Example
示例 2
; Example of using ACos with degrees.
#include <Math.au3>
#include <MsgBoxConstants.au3>
Local $fDegree = _Degree(ACos(-1))
MsgBox($MB_SYSTEMMODAL, Default, "ACos(-1) = " & $fDegree & " degrees")
----------------------------------------
该函数可以通过命令 exect 调用
参见:
Cos, Sin, Tan, ASin, ATan
exect=$var_pi=2*ACos(0)||$var_nd=$var_pi/180||$var_nr=180/$var_pi||$var_na=ACos(0.707106781186548)*$var_nr||$var_nb=ACos(-1)*$var_nr||ACos(0.5)/$var_nd GLOBALEXECT<a> ;; 使用电弧余弦函数进行各种计算
© Аверин Андрей для Total Commander Image Averin-And@yandex.ru
|