Atn Function

Fungsi Trigonometri yang mengembalikan arctangent ekspresi numerik. Nilai kembali berada dalam kisaran-Pi/2 sampai + Pi 2.

The arctangent is the inverse of the tangent function. The Atn Function returns the angle "Alpha", expressed in radians, using the tangent of this angle. The function can also return the angle "Alpha" by comparing the ratio of the length of the side that is opposite of the angle to the length of the side that is adjacent to the angle in a right-angled triangle.

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

Sintaksis:


        Atn (Number As Double) As Double
    

Nilai balikan:

Double

Parameter:

Number: Any numerical expression that represents the ratio of two sides of a right triangle. The Atn function returns the corresponding angle in radians (arctangent).

Untuk mengonversi radian ke derajat, kalikan radian dengan 180/pi.

degree=(radian*180)/pi

radian=(degree*pi)/180

Pi is here the fixed circle constant with the rounded value 3.14159. Pi is a Basic mathematical constant.

Kode kesalahan:

5 Tidak sah dalam pemanggilan prosedur

Contoh:


        ' Contoh berikut untuk menghitung segitiga siku-siku
        ' sudut Alpha dari garis singgung sudut Alpha:
        Sub ExampleAtn
        ' bulatan Pi = 3.14159 adalah konstanta yang ditentukan sebelumnya
        Dim d1 As Double
        Dim d2 As Double
            d1 = InputBox("Masukkan panjang sisi yang berdekatan dengan sudut: ","Berdekatan")
            d2 = InputBox("Masukkan panjang sisi yang berseberangan dengan sudut: ","Seberang")
            Cetak "Sudut alfa adalah"; (atn (d2 / d1) * 180 / Pi); "derajat"
        End Sub
    

Mohon dukung kami!