Tan Function

角度のタンジェントを指定します。 角度はラジアン単位で指定します。

Using the angle Alpha, the Tan function calculates the ratio of the length of the side opposite the angle to the length of the side adjacent to the angle in a right-angled triangle.

Tan(Alpha) = side opposite the angle/side adjacent to angle

Syntax:


Tan (Number As Double) As Double

Return value:

Double

Parameters:

Number: Tan 値を計算させる角度を示す数値表式 (単位はラジアン)。

To convert degrees to radians, multiply by Pi/180. To convert radians to degrees, multiply by 180/Pi.

degrees=(radians*180)/Pi

radians=(degrees*Pi)/180

Pi is approximately 3.141593.

Error codes:

5 無効なプロシージャー呼び出しです

Example:


REM この例では、直角三角形を想定しています。
REM ここでは 1 つの頂角 (通常の角度) とその対辺の長さから、この頂点に隣接する辺の長さを計算しています。
Sub ExampleTangens
REM Pi = 3.1415926 は事前定義されている定数
Dim d1 As Double
Dim dAlpha As Double
    d1 = InputBox("Enter the length of the side opposite the angle:","opposite")
    dAlpha = InputBox("Enter the Alpha angle (in degrees):","Alpha")
    Print "the length of the side adjacent the angle is"; (d1 / tan (dAlpha * Pi / 180))
End Sub

ご支援をお願いします!