Tan

首页  后退  前进

Tan
down2

Tan

计算数的正切值.

 

Tan ( expression )

参数

expression

弧度值.

返回值

返回表达式的三角正切值.

备注

1° = pi / 180 弧度.

正切值是"无穷"的, 对于 ... -3PI/2, -PI/2, PI/2, 3PI/2, 5PI/2, ... 等等, 函数往往 为 Pi 的一半返回 1.63317787283838e+016 的倍数.

 

函数示例

#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 tangent of PI / 4.
    Local $fTan1 = Tan($PI / 4)
    ; Display the result.
    MsgBox($MB_SYSTEMMODAL, "", $fTan1)
    ; Assign a Local variable the formula to switch from radian to degree (equals to one degree in radian).
    Local $iDegToRad = $PI / 180
    ; Assign a Local variable the tangent of 90 degrees (firstly converted to radians).
    Local $fTan2 = Tan(90 * $iDegToRad)
    ; Display the result.
    MsgBox($MB_SYSTEMMODAL, "", $fTan2)
EndFunc   ;==>Example

----------------------------------------

 

该函数可以通过命令 exect 调用

参见:

ATan, Sin, Cos, ASin, ACos

例子
copy
Tan(3.14159265358979/4) ;; 角度45°相切

 

exect=$var_pi=3.14159265358979||$var_nr=180/$var_pi||Tan(30/$var_nr) GLOBALEXECT<a> ;; 使用角度正切函数进行各种计算

up2

tcimage © Аверин Андрей для Total Commander Image Averin-And@yandex.ru