Collabora Office 21.06 ヘルプ
この三角関数は、与えられた数値表式の Atn (アークタンジェント、逆正接) 値を計算します。戻り値は、-π/2 から +π/2 の範囲を取ります。
Atn 関数は、Tan 関数の逆関数です。つまり Atn 関数に、頂角αの Tan 値を渡すと、この頂角の値を逆算して返します (単位はラジアン) 。これは、頂角の 1 つをαとする直角三角形を想定して、この頂点に隣接する辺と対辺の比率から、頂点αを計算する関数ということもできます。
Atn (頂点の対辺の長さ/頂点に隣接する辺の長さ)= 頂点の角度α
Atn (Number)
倍精度
Number: 直角三角形の 1 つの頂点に隣接する辺と対辺の比率を示す数値表式。Atn 関数による計算では、この値に該当する角度 (アークタンジェント、逆正接) をラジアン値で返します
ラジアン値を通常の角度に変換するには、ラジアン値×180/π と計算します。
通常の角度の値 = (ラジアン値*180)/pi
ラジアン値 = (通常の角度の値*pi)/180
Pi is here the fixed circle constant with the rounded value 3.14159. Pi is a Basic mathematical constant.
REM この例では、頂角の 1 つをαとする直角三角形を想定して、
REM この頂点に隣接する辺と対辺の長さから、頂角αの値を計算します。
Sub ExampleAtn
REM Pi = 3.1415926 は事前定義されている定数で、円周率の近似値
Dim d1 As Double
Dim d2 As Double
d1 = InputBox("Enter the length of the side adjacent to the angle:","Adjacent")
d2 = InputBox("Enter the length of the side opposite the angle:","Opposite")
Print "The Alpha angle is"; (atn (d2/d1) * 180 / Pi); " degrees"
End Sub