Tan函数
用于返回已指定数值的正切值。
格式
Tan (角度)
参数
- 角度
- 指定表示角度的实值。
返回值
以数值返回表示指定角度的数值的正切值。
说明
Tan用于返回正切值。参数单位必须为弧度。
要将角度转换为弧度时,需要使用DegToRad函数。
参阅
Abs函数, Atan函数, Atan2函数, Cos函数, Int函数, Mod运算符, Not运算符, Sgn函数, Sin函数, Sqr函数, Str$函数, Val函数
Tan函数使用示例
Function tantest
Real num
Print "Enter number in radians to calculate tangent for:"
Input num
Print "The tangent of ", num, "is ", Tan(num)
Fend
如下所示为通过命令窗口使用Tan函数的示例。
> print tan(0)
0.00
> print tan(degtorad(45))
1
>
← Tab$函数 TargetOK函数 →