Function Reference


Tan

Calculates the tangent of a number.

Tan ( expression )

Parameters

expression Value in radians.

Return Value

Returns the trigonometric tangent of the number.

Remarks

1° = pi / 180 radians.
Note that Tan() is "infinite" for ... -3PI/2, -PI/2, PI/2, 3PI/2, 5PI/2, ... and tends to return 1.63317787283838e+016 for such multiples of Pi-halves.

Related

ACos, ASin, ATan, Cos, Sin

Example

#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

AltStyle によって変換されたページ (->オリジナル) /