Sin
计算数的正弦值.
Sin ( expression )
参数
返回值
返回表达式的三角正弦值.
备注
1° = pi / 180 弧度.
函数示例
#include <MsgBoxConstants.au3>
Example()
Func Example()
; Assign a Local constant variable the approximate PI number.
Local Const $PI = 3.141592653589793
; Assign a Local variable the sine of PI / 4 (equals to Sqrt(2) / 2).
Local $fSin1 = Sin($PI / 4)
; Display the result.
MsgBox($MB_SYSTEMMODAL, "", $fSin1)
; Assign a Local variable the formula to switch from radian to degree (equals to one degree in radian).
Local $fDegToRad = $PI / 180
; Assign a Local variable the sine of 90 degrees (firstly converted to radians).
Local $fSin2 = Sin(90 * $fDegToRad)
; Display the result.
MsgBox($MB_SYSTEMMODAL, "", $fSin2)
EndFunc ;==>Example
----------------------------------------
该函数可以通过命令 exect 调用
参见:
ASin, Cos, Tan, ACos, ATan
Sin(3.14159265358979/4) ;; 45°正弦角返回0.707106781186547,相当于sqrt(2)/ 2
exect=$var_pi=3.14159265358979||$var_nd=$var_pi/180||Sin(90*$var_nd) GLOBALEXECT<a> ;; 各种计算使用正弦函数的角度
© Аверин Андрей для Total Commander Image Averin-And@yandex.ru
|