Tan Function
Returns the tangent of a numeric expression.
Syntax
Tan(radians)
Parameters
- degrees
- Specify a real number value representing an angle.
Return Values
Real number containing the tangent of the parameter radians.
Description
Tan returns the Tangent of the numeric expression. The numeric expression (radians) may be any numeric value as long as it is expressed in radian units.
To convert from radians to degrees, use the RadToDeg function.
See Also
Abs, Atan, Atan2, Cos, Int, Mod, Not, Sgn, Sin, Sqr, Str$, Val
Tan Function Example
Function tantest
Real num
Print "Enter number in radians to calculate tangent for:"
Input num
Print "The tangent of ", num, "is ", Tan(num)
Fend
The examples shown below show some typical results using the Tan instruction from the Command window.
> print tan(0)
0.00
> print tan(45)
1.6197751905439
>